Re: [FFmpeg-devel] [PATCH] avcodec/hevcdec: Avoid only partly skiping duplicate first slices
On Sat, Mar 23, 2019 at 05:33:25PM -0300, James Almer wrote: > On 3/23/2019 5:25 PM, Michael Niedermayer wrote: > > Fixes: NULL pointer dereference and out of array access > > Fixes: > > 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 > > Fixes: > > 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 > > > > Found-by: continuous fuzzing process > > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/hevcdec.c | 3 +++ > > 1 file changed, 3 insertions(+) > > > > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c > > index 86adab0ae1..4d149f4d9f 100644 > > --- a/libavcodec/hevcdec.c > > +++ b/libavcodec/hevcdec.c > > @@ -488,6 +488,9 @@ static int hls_slice_header(HEVCContext *s) > > > > // Coded parameters > > sh->first_slice_in_pic_flag = get_bits1(gb); > > +if (s->ref && sh->first_slice_in_pic_flag) > > +return 0; // This slice will be skiped later, do not corrupt state > > I assume this is a regression after 70c8c8a818? If so, please also > backport this patch to branches 2.8 to 4.1. yes, will do [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Into a blind darkness they enter who follow after the Ignorance, they as if into a greater darkness enter who devote themselves to the Knowledge alone. -- Isha Upanishad signature.asc Description: PGP signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
Re: [FFmpeg-devel] [PATCH] avcodec/hevcdec: Avoid only partly skiping duplicate first slices
On 3/23/2019 5:25 PM, Michael Niedermayer wrote: > Fixes: NULL pointer dereference and out of array access > Fixes: > 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 > Fixes: > 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 > > Found-by: continuous fuzzing process > https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg > Signed-off-by: Michael Niedermayer > --- > libavcodec/hevcdec.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c > index 86adab0ae1..4d149f4d9f 100644 > --- a/libavcodec/hevcdec.c > +++ b/libavcodec/hevcdec.c > @@ -488,6 +488,9 @@ static int hls_slice_header(HEVCContext *s) > > // Coded parameters > sh->first_slice_in_pic_flag = get_bits1(gb); > +if (s->ref && sh->first_slice_in_pic_flag) > +return 0; // This slice will be skiped later, do not corrupt state I assume this is a regression after 70c8c8a818? If so, please also backport this patch to branches 2.8 to 4.1. > + > if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { > s->seq_decode = (s->seq_decode + 1) & 0xff; > s->max_ra = INT_MAX; > ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".
[FFmpeg-devel] [PATCH] avcodec/hevcdec: Avoid only partly skiping duplicate first slices
Fixes: NULL pointer dereference and out of array access Fixes: 13871/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5746167087890432 Fixes: 13845/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HEVC_fuzzer-5650370728034304 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/hevcdec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c index 86adab0ae1..4d149f4d9f 100644 --- a/libavcodec/hevcdec.c +++ b/libavcodec/hevcdec.c @@ -488,6 +488,9 @@ static int hls_slice_header(HEVCContext *s) // Coded parameters sh->first_slice_in_pic_flag = get_bits1(gb); +if (s->ref && sh->first_slice_in_pic_flag) +return 0; // This slice will be skiped later, do not corrupt state + if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) { s->seq_decode = (s->seq_decode + 1) & 0xff; s->max_ra = INT_MAX; -- 2.21.0 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".