Browse Source

avformat/mp3dec: Check that the frame fits within the probe buffer

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit e9a335150a)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.1.5
Michael Niedermayer 6 years ago
parent
commit
cf6f4e0d68
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mp3dec.c

+ 1
- 1
libavformat/mp3dec.c View File

@@ -91,7 +91,7 @@ static int mp3_read_probe(AVProbeData *p)

header = AV_RB32(buf2);
ret = avpriv_mpegaudio_decode_header(&h, header);
if (ret != 0)
if (ret != 0 || end - buf2 < h.frame_size)
break;
buf2 += h.frame_size;
framesizes += h.frame_size;


Loading…
Cancel
Save