avoid seg on invalid params to record app.(MODAPP-63)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7026 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris committed 2007-12-29 23:15:57 +00:00
1 parent 7347719339
commit 33bd22a308
6 files changed
+14 -5

No files matched your search

+5
View File
@@ -42,6 +42,11 @@ SWITCH_DECLARE(switch_status_t) switch_core_file_open(switch_file_handle_t *fh,
char stream_name[128] = "";
char *rhs = NULL;
if (switch_strlen_zero(file_path)) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Filename\n");
return SWITCH_STATUS_FALSE;
}
if ((rhs = strstr(file_path, SWITCH_URL_SEPARATOR))) {
switch_copy_string(stream_name, file_path, (rhs + 1) - file_path);
ext = stream_name;