提交 92c6f3ab authored 作者: Michael Jerris's avatar Michael Jerris

CID:1214192 Dereference after null check, don't crash when no file name passed on file open

上级 179e07c6
......@@ -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 {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论