summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/ffmpeg/libavcodec/adx.c
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/ffmpeg/libavcodec/adx.c')
-rw-r--r--chromium/third_party/ffmpeg/libavcodec/adx.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/chromium/third_party/ffmpeg/libavcodec/adx.c b/chromium/third_party/ffmpeg/libavcodec/adx.c
index 94bc386dab1..30e13c0c1c3 100644
--- a/chromium/third_party/ffmpeg/libavcodec/adx.c
+++ b/chromium/third_party/ffmpeg/libavcodec/adx.c
@@ -47,13 +47,8 @@ int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
return AVERROR_INVALIDDATA;
offset = AV_RB16(buf + 2) + 4;
- if (offset < 6) {
- av_log(avctx, AV_LOG_ERROR, "offset is prior data\n");
- return AVERROR_INVALIDDATA;
- }
-
/* if copyright string is within the provided data, validate it */
- if (bufsize >= offset && memcmp(buf + offset - 6, "(c)CRI", 6))
+ if (bufsize >= offset && offset >= 6 && memcmp(buf + offset - 6, "(c)CRI", 6))
return AVERROR_INVALIDDATA;
/* check for encoding=3 block_size=18, sample_size=4 */