mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-13 15:50:59 +00:00
CID:1214192 Dereference after null check, don't crash when no file name passed on file open
This commit is contained in:
parent
179e07c649
commit
92c6f3abc5
@ -2828,6 +2828,11 @@ static switch_status_t file_open(switch_file_handle_t *handle, const char *path,
|
||||
}
|
||||
}
|
||||
|
||||
if (!context->write.file_name) {
|
||||
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "No file name specified.\n");
|
||||
return SWITCH_STATUS_GENERR;
|
||||
}
|
||||
|
||||
if ((ext = strrchr(context->write.file_name, '.'))) {
|
||||
ext++;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user