OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f0d9b4
)
targa: Fix input buffer size check.
author
Michael Niedermayer
<michaelni@gmx.at>
Mon, 26 Mar 2012 22:12:03 +0000
(
00:12
+0200)
committer
Michael Niedermayer
<michaelni@gmx.at>
Mon, 26 Mar 2012 22:45:32 +0000
(
00:45
+0200)
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/targa.c
patch
|
blob
|
history
diff --git
a/libavcodec/targa.c
b/libavcodec/targa.c
index
5ddd21b
..
5584195
100644
(file)
--- a/
libavcodec/targa.c
+++ b/
libavcodec/targa.c
@@
-229,7
+229,7
@@
static int decode_frame(AVCodecContext *avctx,
buf += res;
}else{
size_t img_size = s->width * ((s->bpp + 1) >> 3);
- CHECK_BUFFER_SIZE(buf, buf_end, img_size, "image data");
+ CHECK_BUFFER_SIZE(buf, buf_end, img_size
* s->height
, "image data");
for(y = 0; y < s->height; y++){
memcpy(dst, buf, img_size);