[FFmpeg-devel] [PATCH 01/25] avfilter/af_headphone: Don't use uninitialized buffer in log message

Paul B Mahol onemda at gmail.com
Wed Sep 9 04:12:52 EEST 2020


On Tue, Sep 08, 2020 at 11:18:32PM +0200, Andreas Rheinhardt wrote:
> This buffer was supposed to be initialized by sscanf(input, "%7[A-Z]%n",
> buf, &len), yet if the first input character is not in the A-Z range,
> buf is not touched (in particular it needn't be zero-terminated if the
> failure happened when parsing the first channel and it still contains
> the last channel name if the failure happened when one channel name
> could be successfully parsed). This is treated as error in which case
> buf is used directly in the log message. This commit fixes this by
> actually using the string that could not be matched in the log message
> instead.
> 

ok


More information about the ffmpeg-devel mailing list