[Pidgin] #7608: Exception when calling open/read/close with a negative file descriptor on Windows (with MS CRT)

Pidgin trac at pidgin.im
Sat Nov 22 10:42:50 EST 2008


#7608: Exception when calling open/read/close with a negative file descriptor on
Windows (with MS CRT)
-------------------+--------------------------------------------------------
Reporter:  fqueze  |        Type:  patch    
  Status:  new     |   Component:  libpurple
 Version:  2.5.2   |    Keywords:           
-------------------+--------------------------------------------------------
 When I compile libpurple with MSVC8 (Visual Studio 2005) and the MS CRT, I
 get exceptions (similar to crashes from a user point of view) in
 wpurple_read/write/close.

 These exceptions are thrown when these functions are called with a
 negative file descriptor. libpurple sometimes does this when a file
 descriptor has been closed: it is replaced by the -1 value in the
 structure where the fd value was stored (happens at least with the xmpp
 and oscar prpls).

 On UNIX, calling these system calls with bad file descriptor values puts
 the EBADF value in errno. I think we should just do the same on Windows.

-- 
Ticket URL: <http://developer.pidgin.im/ticket/7608>
Pidgin <http://pidgin.im>
Pidgin


More information about the Tracker mailing list