21 May
2008
21 May
'08
8:25 p.m.
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++) {