From: Mariah Yang Date: Thu, 19 Jul 2018 08:42:27 +0000 (+0800) Subject: FS-11260 fix set_tts_params segs when the second arg is NULL X-Git-Tag: v1.8.1~3^2~5 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3930250b7905a39d8a30b8d5d03678f74dd2c924;p=thirdparty%2Ffreeswitch.git FS-11260 fix set_tts_params segs when the second arg is NULL --- diff --git a/src/switch_cpp.cpp b/src/switch_cpp.cpp index bec23291fb..3741ba2ffd 100644 --- a/src/switch_cpp.cpp +++ b/src/switch_cpp.cpp @@ -855,8 +855,8 @@ SWITCH_DECLARE(void) CoreSession::set_tts_params(char *tts_name_p, char *voice_n sanity_check_noreturn; switch_safe_free(tts_name); switch_safe_free(voice_name); - tts_name = strdup(tts_name_p); - voice_name = strdup(voice_name_p); + tts_name = strdup(switch_str_nil(tts_name_p)); + voice_name = strdup(switch_str_nil(voice_name_p)); } SWITCH_DECLARE(int) CoreSession::collectDigits(int abs_timeout) {