Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2018-07-29 14:16:37 +0300
committerMichael Niedermayer <michael@niedermayer.cc>2018-08-03 03:08:16 +0300
commit51ac3f43b8bf3b7f2af555af319cd240bb8b4ebf (patch)
tree73e67afb3bd2b590f1e687e39bfec5df2dcfe2ee /libavcodec/mlp_parser.c
parent7dd836a3f9771e0e44df1b27e67d6866d91e06d7 (diff)
avcodec/mlp_parser: Check if synccode is within buffer
Fixes: undefined shift Fixes: 9216/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TRUEHD_fuzzer-6281404575907840 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/mlp_parser.c')
-rw-r--r--libavcodec/mlp_parser.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/mlp_parser.c b/libavcodec/mlp_parser.c
index 185bd4d667..eb3435b6cb 100644
--- a/libavcodec/mlp_parser.c
+++ b/libavcodec/mlp_parser.c
@@ -320,7 +320,7 @@ static int mlp_parse(AVCodecParserContext *s,
mp->bytes_left = 0;
}
- sync_present = (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba;
+ sync_present = buf_size >= 8 && (AV_RB32(buf + 4) & 0xfffffffe) == 0xf8726fba;
if (!sync_present) {
/* The first nibble of a frame is a parity check of the 4-byte