aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2019-11-07 21:16:32 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-01 12:49:26 +0200
commitb1af78f5269d36226ecba3591e3abe95efcfdbdf (patch)
treea0e51fe88d209b4826c6ed6423d75438cc5590f9
parent4b857fc113eac4d445b77b1c9ca80c4537e248f1 (diff)
downloadffmpeg-b1af78f5269d36226ecba3591e3abe95efcfdbdf.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 099ca57d24..743c2b2420 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;
}