Commit 78e2380a authored by Ronald S. Bultje's avatar Ronald S. Bultje

targa: prevent integer overflow in bufsize check.

parent b3db9cee
......@@ -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; \
} \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment