Revision e48fe14a libavcodec/targa.c

View differences:

libavcodec/targa.c
34 34
} TargaContext;
35 35

  
36 36
#define CHECK_BUFFER_SIZE(buf, buf_end, needed, where) \
37
    if(buf + needed > buf_end){ \
37
    if(needed > buf_end - buf){ \
38 38
        av_log(avctx, AV_LOG_ERROR, "Problem: unexpected end of data while reading " where "\n"); \
39 39
        return -1; \
40 40
    } \

Also available in: Unified diff