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

Freeswitch SVN mikej at freeswitch.org
Tue Aug 15 11:57:20 EDT 2006


Author: mikej
Date: Tue Aug 15 11:57:20 2006
New Revision: 2296

Modified:
   freeswitch/trunk/src/switch_event.c

Log:
fix segfault 

Modified: freeswitch/trunk/src/switch_event.c
==============================================================================
--- freeswitch/trunk/src/switch_event.c	(original)
+++ freeswitch/trunk/src/switch_event.c	Tue Aug 15 11:57:20 2006
@@ -441,9 +441,11 @@
 	char data[2048];
 
 	va_list ap;
-	va_start(ap, fmt);
-	vsnprintf(data, sizeof(data), fmt, ap);
-	va_end(ap);
+	if (fmt) {
+		va_start(ap, fmt);
+		vsnprintf(data, sizeof(data), fmt, ap);
+		va_end(ap);
+	}
 
 	if (ret == -1) {
 		return SWITCH_STATUS_MEMERR;



More information about the Freeswitch-svn mailing list