mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-21 10:55:51 +02:00
targa: prevent integer overflow in bufsize check.
(cherry picked from commit 78e2380a6d
)
This commit is contained in:
parent
d4e321d9c2
commit
e48fe14a54
@ -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; \
|
||||
} \
|
||||
|
Loading…
Reference in New Issue
Block a user