Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-21 Thread Michael Niedermayer
On Thu, Feb 20, 2020 at 11:29:51PM +0100, Paul B Mahol wrote: > On 2/20/20, Michael Niedermayer wrote: > > On Thu, Feb 20, 2020 at 08:11:34PM +0100, Paul B Mahol wrote: > >> Are you sure this is correct? > >> Does asan reports exactly overread by 4? > > > > the next line passes diff_size - 8 as a

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Paul B Mahol
On 2/20/20, Michael Niedermayer wrote: > On Thu, Feb 20, 2020 at 08:11:34PM +0100, Paul B Mahol wrote: >> Are you sure this is correct? >> Does asan reports exactly overread by 4? > > the next line passes diff_size - 8 as a unsigned data size > if diff_size is smaller than 8, diff_size - 8 is very

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Michael Niedermayer
On Thu, Feb 20, 2020 at 08:11:34PM +0100, Paul B Mahol wrote: > Are you sure this is correct? > Does asan reports exactly overread by 4? the next line passes diff_size - 8 as a unsigned data size if diff_size is smaller than 8, diff_size - 8 is very big and the overread checks which use that will

Re: [FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Paul B Mahol
Are you sure this is correct? Does asan reports exactly overread by 4? On 2/20/20, Michael Niedermayer wrote: > Fixes: out of array read > Fixes: > 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344 > > Found-by: continuous fuzzing process > https://github.com

[FFmpeg-devel] [PATCH 2/2] avcodec/cdtoons: Fix off by 4 check on diff_size

2020-02-20 Thread Michael Niedermayer
Fixes: out of array read Fixes: 20742/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_CDTOONS_fuzzer-5738148607033344 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/cdtoons.c | 2 +- 1 file