diff options
Diffstat (limited to 'libavcodec/smacker.c')
-rw-r--r-- | libavcodec/smacker.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/smacker.c b/libavcodec/smacker.c index 7a142de..a6f169a 100644 --- a/libavcodec/smacker.c +++ b/libavcodec/smacker.c @@ -177,6 +177,11 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int int escapes[3]; DBCtx ctx; + if(size >= UINT_MAX>>4){ // (((size + 3) >> 2) + 3) << 2 must not overflow + av_log(smk->avctx, AV_LOG_ERROR, "size too large\n"); + return -1; + } + tmp1.length = 256; tmp1.maxlength = 0; tmp1.current = 0; |