[Freeswitch-svn] [commit] r13125 - freeswitch/trunk/src

FreeSWITCH SVN stkn at freeswitch.org
Wed Apr 22 16:34:49 PDT 2009


Author: stkn
Date: Wed Apr 22 18:34:48 2009
New Revision: 13125

Log:
Do not use struct fd_set uninitialized (always FD_ZERO() them, before using FD_SET() on a new one, or reusing them after select()). Fixes a segfault on solaris

Modified:
   freeswitch/trunk/src/switch_log.c

Modified: freeswitch/trunk/src/switch_log.c
==============================================================================
--- freeswitch/trunk/src/switch_log.c	(original)
+++ freeswitch/trunk/src/switch_log.c	Wed Apr 22 18:34:48 2009
@@ -332,6 +332,7 @@
 
 			fd = fileno(handle);
 			memset(&to, 0, sizeof(to));
+			FD_ZERO(&can_write);
 			FD_SET(fd, &can_write);
 			to.tv_sec = 0;
 			to.tv_usec = 100000;



More information about the Freeswitch-svn mailing list