[SCM] libav/master: adx: check that the offset is not negative
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun May 4 21:36:32 UTC 2014
The following commit has been merged in the master branch:
commit ff409c7d80b6781e4b81dd860badb569061ddaa5
Author: Anton Khirnov <anton at khirnov.net>
Date: Thu Nov 28 10:54:35 2013 +0100
adx: check that the offset is not negative
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC:libav-stable at libav.org
(cherry picked from commit 5569146d48f06564e8fa393424782cceed510916)
diff --git a/libavcodec/adx.c b/libavcodec/adx.c
index 870216c..9b58e37 100644
--- a/libavcodec/adx.c
+++ b/libavcodec/adx.c
@@ -48,7 +48,7 @@ int avpriv_adx_decode_header(AVCodecContext *avctx, const uint8_t *buf,
offset = AV_RB16(buf + 2) + 4;
/* 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 */
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list