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:
authorRonald S. Bultje <rsbultje@gmail.com>2011-02-21 21:44:37 +0300
committerMichael Niedermayer <michaelni@gmx.at>2011-02-22 04:44:37 +0300
commite48fe14a54d8360336dbb22f3f787815b57dda47 (patch)
treedf37df4dc86220524ec16e1257be26fdd34e288d /libavcodec/targa.c
parentd4e321d9c2f52f77e06ca48c3ddf71f8d4219f7b (diff)
targa: prevent integer overflow in bufsize check.
(cherry picked from commit 78e2380a6d09e7a8b2a74d090abfb0a922e046f6)
Diffstat (limited to 'libavcodec/targa.c')
-rw-r--r--libavcodec/targa.c2
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; \
} \