[FFmpeg-devel] [PATCH v2 2/3] avfilter/vf_mix: Check sscanf() return value

Limin Wang lance.lmwang at gmail.com
Sun Mar 29 01:18:51 EET 2020


On Sat, Mar 28, 2020 at 08:10:51PM +0100, Nicolas George wrote:
> lance.lmwang at gmail.com (12020-03-28):
> > From: Limin Wang <lance.lmwang at gmail.com>
> > 
> > Signed-off-by: Limin Wang <lance.lmwang at gmail.com>
> > ---
> >  libavfilter/vf_mix.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> Why? What do you expect to change with this patch, and how is it
> supposed to be better?
If av_sscanf failed,  s->weights[i] is invalid data and can't be used
further. As the old code allow to use the last weights, so I use 
continue to avoid invalid access only. Do you think it's better to
print out one warning message?

> 
> Regards,
> 
> -- 
>   Nicolas George



-- 
Thanks,
Limin Wang


More information about the ffmpeg-devel mailing list