mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-06-11 08:13:06 +00:00
avfilter/vf_frei0r: guard against NULL string fields.
This commit is contained in:
@@ -144,7 +144,7 @@ static int set_param(AVFilterContext *ctx, f0r_param_info_t info, int index, cha
|
||||
|
||||
fail:
|
||||
av_log(ctx, AV_LOG_ERROR, "Invalid value '%s' for parameter '%s'.\n",
|
||||
param, info.name);
|
||||
param, info.name ? info.name : "(null)");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ static int set_params(AVFilterContext *ctx, const char *params)
|
||||
return 0;
|
||||
|
||||
for (i = 0; i < s->plugin_info.num_params; i++) {
|
||||
f0r_param_info_t info;
|
||||
f0r_param_info_t info = { 0 };
|
||||
char *param;
|
||||
int ret;
|
||||
|
||||
@@ -294,7 +294,8 @@ static av_cold int frei0r_init(AVFilterContext *ctx,
|
||||
av_log(ctx, AV_LOG_VERBOSE,
|
||||
"name:%s author:'%s' explanation:'%s' color_model:%s "
|
||||
"frei0r_version:%d version:%d.%d num_params:%d\n",
|
||||
pi->name, pi->author, pi->explanation,
|
||||
pi->name ? pi->name : "(null)", pi->author ? pi->author : "(null)",
|
||||
pi->explanation ? pi->explanation : "(null)",
|
||||
pi->color_model == F0R_COLOR_MODEL_BGRA8888 ? "bgra8888" :
|
||||
pi->color_model == F0R_COLOR_MODEL_RGBA8888 ? "rgba8888" :
|
||||
pi->color_model == F0R_COLOR_MODEL_PACKED32 ? "packed32" : "unknown",
|
||||
|
||||
Reference in New Issue
Block a user