projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59383d5
)
mss2: do not try to read too many palette entries
author
Alberto Delmás
<adelmas@gmail.com>
Mon, 3 Sep 2012 15:28:01 +0000
(17:28 +0200)
committer
Kostya Shishkov
<kostya.shishkov@gmail.com>
Thu, 6 Sep 2012 18:38:22 +0000
(20:38 +0200)
Reported by Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Kostya Shishkov <kostya.shishkov@gmail.com>
libavcodec/mss2.c
patch
|
blob
|
history
diff --git
a/libavcodec/mss2.c
b/libavcodec/mss2.c
index
ce3cfb8
..
9914562
100644
(file)
--- a/
libavcodec/mss2.c
+++ b/
libavcodec/mss2.c
@@
-161,7
+161,7
@@
static int decode_pal_v2(MSS12Context *ctx, const uint8_t *buf, int buf_size)
return 0;
ncol = *buf++;
- if (buf_size < 2 + ncol * 3)
+ if (
ncol > ctx->free_colours ||
buf_size < 2 + ncol * 3)
return -1;
for (i = 0; i < ncol; i++)
*pal++ = AV_RB24(buf + 3 * i);