[FFmpeg-devel] [PATCH 4/4] avcodec/evc_ps: Check num_ref_pic_list_in_sps

Michael Niedermayer michael at niedermayer.cc
Thu Jul 27 20:38:37 EEST 2023


On Wed, Jul 26, 2023 at 09:19:10PM -0300, James Almer wrote:
> On 7/26/2023 8:59 PM, Michael Niedermayer wrote:
> > Fixes: out of array write
> > Fixes: 60798/clusterfuzz-testcase-minimized-ffmpeg_BSF_EVC_FRAME_MERGE_fuzzer-4633529766772736
> > 
> > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
> > Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> > ---
> >   libavcodec/evc_ps.c | 9 +++++++++
> >   1 file changed, 9 insertions(+)
> > 
> > diff --git a/libavcodec/evc_ps.c b/libavcodec/evc_ps.c
> > index 04ee6a45e6..64384a392c 100644
> > --- a/libavcodec/evc_ps.c
> > +++ b/libavcodec/evc_ps.c
> > @@ -243,11 +243,20 @@ int ff_evc_parse_sps(GetBitContext *gb, EVCParamSets *ps)
> >           sps->rpl1_same_as_rpl0_flag = get_bits1(gb);
> >           sps->num_ref_pic_list_in_sps[0] = get_ue_golomb(gb);
> > +        if ((unsigned)sps->num_ref_pic_list_in_sps[0] >= EVC_MAX_NUM_RPLS) {
> 
> EVC_MAX_NUM_RPLS should be 64, not 32 as it's currently defined. So change
> that too and it LGTM.

ok will do

thx for reviewing

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

"You are 36 times more likely to die in a bathtub than at the hands of a
terrorist. Also, you are 2.5 times more likely to become a president and
2 times more likely to become an astronaut, than to die in a terrorist
attack." -- Thoughty2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20230727/fd3cd95d/attachment.sig>


More information about the ffmpeg-devel mailing list