[FFmpeg-devel] [PATCH] avutil/opt: Don't use NULL for %s string in a log message

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Apr 1 05:13:11 EEST 2020


Anton Khirnov:
> Quoting Andreas Rheinhardt (2020-03-29 06:14:37)
>> If one calls av_opt_set() with an incorrect string to set the value of
>> an option of type AV_OPT_TYPE_VIDEO_RATE, the given string is used in a
>> log message via %s. This also happens when the string is actually a
>> nullpointer in which case using it for %s is forbidden.
>>
>> This commit changes this by erroring out early in case of a nullpointer.
>>
>> This also fixes a warning from GCC 9.2:
>> "ā€˜%sā€™ directive argument is null [-Wformat-overflow=]"
>>
>> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
>> ---
> 
> Looks ok
> 
Applied, thanks.

- Andreas


More information about the ffmpeg-devel mailing list