[FFmpeg-devel] [PATCH] avcodec/cbs_h2645: keep separate parameter set lists for reading and writing

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Wed Jul 1 14:59:02 EEST 2020


James Almer:
> Similar logic as 4e2bef6a82. In scearios where an Access Unit is written right
> after reading it using the same CBS context (hevc_metadata), the list of parsed
> parameters sets used by the writer must not be the one that's the result of the
> reader having already parsed the current Access Unit in question.
> 
> Fixes: out of array access
> Fixes: 23034/clusterfuzz-testcase-minimized-ffmpeg_BSF_HEVC_METADATA_fuzzer-5074645169733632.fuzz
> 
> Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> Signed-off-by: James Almer <jamrial at gmail.com>
> ---
> An alternative is forcing the usage of separate CBS contexts for reading and
> writing.
> 

Am I the only one who thinks this would be cleaner, as it would directly
show to the user that there are two separate states involved? It would
also lead to a smaller diff.

- Andreas


More information about the ffmpeg-devel mailing list