[Freeswitch-svn] [commit] r10386 - freeswitch/trunk/src/mod/applications/mod_commands

FreeSWITCH SVN mikej at freeswitch.org
Thu Nov 13 13:05:01 PST 2008


Author: mikej
Date: Thu Nov 13 16:05:01 2008
New Revision: 10386

Log:
segfaults are bad

Modified:
   freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c

Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c	Thu Nov 13 16:05:01 2008
@@ -2670,7 +2670,7 @@
 
 			for (x = 0 ; x < argc; x++) {
 				var_name = argv[x];
-				if ((var_value = strchr(var_name, '='))) {
+				if (var_name && (var_value = strchr(var_name, '='))) {
 					*var_value++ = '\0';
 				}
 				if (switch_strlen_zero(var_name)) {



More information about the Freeswitch-svn mailing list