Opened 8 years ago
Closed 8 years ago
#10988 closed Bug report (fixed)
libfilezilla thread.cpp contains a bug
Reported by: | ckelsel | Owned by: | |
---|---|---|---|
Priority: | critical | Component: | libfilezilla |
Keywords: | _beginthreadex | Cc: | |
Component version: | Operating system type: | Windows | |
Operating system version: |
Description
impl_->handle_ = reinterpret_cast<HANDLE>(_beginthreadex(0, 0, thread_proc, impl_, 0, 0));
if (impl_->handle_ == INVALID_HANDLE_VALUE) {
...
}
_beginthreadex return 0 on error , while compare to INVALID_HANDLE_VALUE(-1)
#define INVALID_HANDLE_VALUE ((HANDLE)(LONG_PTR)-1)
On an error, _beginthreadex returns 0, and errno and _doserrno are set.
https://msdn.microsoft.com/en-us/library/kdzttdcb.aspx
Note:
See TracTickets
for help on using tickets.
Thanks, a fix has been committed to the repository.