projects
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b3db9ce
)
targa: prevent integer overflow in bufsize check.
author
Ronald S. Bultje
<rsbultje@gmail.com>
Mon, 21 Feb 2011 18:44:37 +0000
(13:44 -0500)
committer
Ronald S. Bultje
<rsbultje@gmail.com>
Mon, 21 Feb 2011 18:44:37 +0000
(13:44 -0500)
libavcodec/targa.c
patch
|
blob
|
history
diff --git
a/libavcodec/targa.c
b/libavcodec/targa.c
index
0892b6f
..
3c220f4
100644
(file)
--- 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; \
} \