This website works better with JavaScript.
Home
Help
Sign In
falkTX
/
FFmpeg
mirror of
https://github.com/falkTX/FFmpeg.git
Watch
1
Star
0
Fork
0
Code
Issues
0
Releases
338
Wiki
Activity
Browse Source
targadec: Simplify RLE out of packet check.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.11
Michael Niedermayer
14 years ago
parent
f9ca1ac796
commit
eb3f81e4ef
1 changed files
with
1 additions
and
1 deletions
Unified View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
libavcodec/targa.c
+ 1
- 1
libavcodec/targa.c
View File
@@ -55,7 +55,7 @@ static int targa_decode_rle(AVCodecContext *avctx, TargaContext *s, const uint8_
type = *src++;
type = *src++;
count = (type & 0x7F) + 1;
count = (type & 0x7F) + 1;
type &= 0x80;
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);
av_log(avctx, AV_LOG_ERROR, "Packet went out of bounds: position (%i,%i) size %i\n", x, y, count);
return -1;
return -1;
}
}
Write
Preview
Loading…
Cancel
Save