]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-11260 fix set_tts_params segs when the second arg is NULL
authorMariah Yang <galm@163.com>
Thu, 19 Jul 2018 08:42:27 +0000 (16:42 +0800)
committerMuteesa Fred <muteesafred@hotmail.com>
Tue, 24 Jul 2018 07:21:58 +0000 (07:21 +0000)
src/switch_cpp.cpp

index bec23291fb418f93766b56a234bfef1ceaafbc39..3741ba2ffd9d9546b05e84fbea2bf5c52c5b9323 100644 (file)
@@ -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) {