diff options
author | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-21 13:44:37 -0500 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2011-02-21 13:44:37 -0500 |
commit | 78e2380a6d09e7a8b2a74d090abfb0a922e046f6 (patch) | |
tree | be513e802466981529c1481f573e43d66adf997d /libavcodec | |
parent | b3db9ceef13037f2b6963a84b7abf8871a1e0f8a (diff) | |
download | ffmpeg-78e2380a6d09e7a8b2a74d090abfb0a922e046f6.tar.gz |
targa: prevent integer overflow in bufsize check.
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/targa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 0892b6f0ed..3c220f4082 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -34,7 +34,7 @@ typedef struct TargaContext { } TargaContext; #define CHECK_BUFFER_SIZE(buf, buf_end, needed, where) \ - if(buf + needed > buf_end){ \ + if(needed > buf_end - buf){ \ av_log(avctx, AV_LOG_ERROR, "Problem: unexpected end of data while reading " where "\n"); \ return -1; \ } \ |