[svn] assuan - r328 - trunk/src
svn author marcus
cvs at cvs.gnupg.org
Tue Dec 8 05:47:31 CET 2009
Author: marcus
Date: 2009-12-08 05:47:31 +0100 (Tue, 08 Dec 2009)
New Revision: 328
Modified:
trunk/src/ChangeLog
trunk/src/assuan.h
Log:
2009-12-08 Marcus Brinkmann <marcus at g10code.de>
* assuan_fd_from_posix_fd (assuan_fd_from_posix_fd): Handle invalid fd early.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2009-12-08 04:20:16 UTC (rev 327)
+++ trunk/src/ChangeLog 2009-12-08 04:47:31 UTC (rev 328)
@@ -1,5 +1,7 @@
2009-12-08 Marcus Brinkmann <marcus at g10code.de>
+ * assuan_fd_from_posix_fd (assuan_fd_from_posix_fd): Handle invalid fd early.
+
* assuan-socket.c (get_nonce): Cast buffer to unsigned.
(_assuan_sock_connect) [HAVE_W32_SYSTEM]: Drop ctx argument from
read_port_and_nonce invocation.
Modified: trunk/src/assuan.h
===================================================================
--- trunk/src/assuan.h 2009-12-08 04:20:16 UTC (rev 327)
+++ trunk/src/assuan.h 2009-12-08 04:47:31 UTC (rev 328)
@@ -88,7 +88,10 @@
static inline assuan_fd_t
assuan_fd_from_posix_fd (int fd)
{
- return (assuan_fd_t) _get_osfhandle (fd);
+ if (fd < 0)
+ return ASSUAN_INVALID_FD;
+ else
+ return (assuan_fd_t) _get_osfhandle (fd);
}
#else
typedef int assuan_fd_t;
More information about the Gnupg-commits
mailing list