diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-01-21 04:36:06 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-01-28 01:36:42 +0100 |
commit | eb3f81e4ef73bb8d7e2c75ff0e8cb43de1c7dac5 (patch) | |
tree | da76c8f495c20485c08557a40a00b3c3476275e4 /libavcodec/targa.c | |
parent | f9ca1ac7968f155db51944eac11d393d862e1baa (diff) | |
download | ffmpeg-eb3f81e4ef73bb8d7e2c75ff0e8cb43de1c7dac5.tar.gz |
targadec: Simplify RLE out of packet check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/targa.c')
-rw-r--r-- | libavcodec/targa.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/targa.c b/libavcodec/targa.c index 56e02c1b21..573992ff8a 100644 --- a/libavcodec/targa.c +++ b/libavcodec/targa.c @@ -55,7 +55,7 @@ static int targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_ type = *src++; count = (type & 0x7F) + 1; type &= 0x80; - if((x + count > w) && (x + count + 1 > (h - y) * w)){ + if(x + count > (h - y) * w){ av_log(avctx, AV_LOG_ERROR, "Packet went out of bounds: position (%i,%i) size %i\n", x, y, count); return -1; } |