aboutsummaryrefslogtreecommitdiff
path: root/lib/ffmpeg/libavcodec/adx.c
diff options
context:
space:
mode:
authorFlyingRat <flyingrat@outlook.com>2013-04-07 16:36:04 +0200
committerFlyingRat <flyingrat@outlook.com>2013-04-07 16:36:04 +0200
commit0e63a815aa6af63a21848e04b683d3f506dd41b1 (patch)
tree002f61d8a5b1d294d99fd4ba5b6982d76a612f0c /lib/ffmpeg/libavcodec/adx.c
parent71862137c5337fc678681a23bfbc65f4db7a7b2f (diff)
[FFmpeg] version bump to n1.2 (rev e820e3a) - lib/ffmpeg
This commit now contains the original patches sub directory: patches - Org dir that contains applied xbmc custom patches. patches/README-patches - New README file with info about xbmc patches. patches/obsolete-patches - New dir with obsolete xbmc patches.
Diffstat (limited to 'lib/ffmpeg/libavcodec/adx.c')
-rw-r--r--lib/ffmpeg/libavcodec/adx.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ffmpeg/libavcodec/adx.c b/lib/ffmpeg/libavcodec/adx.c
index 1e5d89c991..7da696d0a8 100644
--- a/lib/ffmpeg/libavcodec/adx.c
+++ b/lib/ffmpeg/libavcodec/adx.c
@@ -18,6 +18,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "adx.h"
@@ -46,6 +47,11 @@ 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))
return AVERROR_INVALIDDATA;