On 08/11/2017 03:24, Sean McGovern wrote:
From: Michael Niedermayer <[email protected]>
Signed-off-by: Michael Niedermayer <[email protected]>
Bug-Id: 1098
Cc: [email protected]
Signed-off-by: Sean McGovern <[email protected]>
---
libavcodec/smacker.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c
index 0e057a1..e829405 100644
--- a/libavcodec/smacker.c
+++ b/libavcodec/smacker.c
@@ -97,6 +97,11 @@ enum SmkBlockTypes {
static int smacker_decode_tree(BitstreamContext *bc, HuffContext *hc,
uint32_t prefix, int length)
{
+ if(length > 32) {
+ av_log(NULL, AV_LOG_ERROR, "length too long\n");
+ return AVERROR_INVALIDDATA;
+ }
+
if (!bitstream_read_bit(bc)) { // Leaf
if(hc->current >= 256){
av_log(NULL, AV_LOG_ERROR, "Tree size exceeded!\n");
I'd name 32 somehow. Space between if and (.
lu
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel