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

Freeswitch SVN mikej at freeswitch.org
Wed May 21 16:25:40 EDT 2008


Author: mikej
Date: Wed May 21 16:25:40 2008
New Revision: 8508

Modified:
   freeswitch/trunk/src/switch_ivr_play_say.c

Log:
handle allocation error. Found by Klockwork (www.klocwork.com)

Modified: freeswitch/trunk/src/switch_ivr_play_say.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr_play_say.c	(original)
+++ freeswitch/trunk/src/switch_ivr_play_say.c	Wed May 21 16:25:40 2008
@@ -1386,6 +1386,9 @@
 		char *tp;
 		switch_size_t mylen = strlen(text) + extra + 1;
 		tmp = malloc(mylen);
+		if (!tmp) {
+			return SWITCH_STATUS_MEMERR;
+		}
 		memset(tmp, 0, mylen);
 		tp = tmp;
 		for (p = text; p && *p; p++) {



More information about the Freeswitch-svn mailing list