aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-11-07 21:16:32 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2019-11-21 23:27:23 +0100
commita6eb5e1f7086d7e7c9cf63b2689e88a224feab9a (patch)
tree10c303d0a33bdf0838d3326a9807af56f083bc0e
parent5e98ede2da98cd4579c13095a8918882e753d08a (diff)
downloadffmpeg-a6eb5e1f7086d7e7c9cf63b2689e88a224feab9a.tar.gz
avformat/mp3dec: Check that the frame fits within the probe buffer
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit e9a335150a62bb377a26ce096187b4476145d02b) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mp3dec.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mp3dec.c b/libavformat/mp3dec.c
index a76fe32e59..f942574a3f 100644
--- a/libavformat/mp3dec.c
+++ b/libavformat/mp3dec.c
@@ -89,7 +89,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;
}