From dc4a621e9ceb81c4c019aa7656c2bfbec2df18d5 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Fri, 15 May 2015 10:42:22 +0200 Subject: [PATCH] avcodec/vp3: Cleanup order of operations for current_run check This shouldnt make a difference Signed-off-by: Michael Niedermayer --- libavcodec/vp3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/vp3.c b/libavcodec/vp3.c index 7cd04fb281..005f043b0f 100644 --- a/libavcodec/vp3.c +++ b/libavcodec/vp3.c @@ -470,7 +470,7 @@ static int unpack_superblocks(Vp3DecodeContext *s, GetBitContext *gb) if (current_run == 34) current_run += get_bits(gb, 12); - if (current_superblock + current_run > s->superblock_count) { + if (current_run > s->superblock_count - current_superblock) { av_log(s->avctx, AV_LOG_ERROR, "Invalid partially coded superblock run length\n"); return -1;