mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-24 05:02:10 +00:00
FS-4860 --resolve This seems to have come from a malformed file_string in the ringback var
This commit is contained in:
@@ -76,6 +76,10 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
|
||||
switch_set_flag(fh, SWITCH_FILE_FLAG_FREE_POOL);
|
||||
}
|
||||
|
||||
if (switch_directory_exists(file_path, fh->memory_pool) == SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "File [%s] is a directory not a file.\n", file_path);
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if ((rhs = strstr(file_path, SWITCH_URL_SEPARATOR))) {
|
||||
switch_copy_string(stream_name, file_path, (rhs + 1) - file_path);
|
||||
@@ -198,6 +202,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_perform_file_open(const char *file,
|
||||
|
||||
fail:
|
||||
|
||||
switch_clear_flag(fh, SWITCH_FILE_OPEN);
|
||||
|
||||
if (switch_test_flag(fh, SWITCH_FILE_FLAG_FREE_POOL)) {
|
||||
switch_core_destroy_memory_pool(&fh->memory_pool);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user