aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-05-15 10:42:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-05-15 11:12:13 +0200
commitdc4a621e9ceb81c4c019aa7656c2bfbec2df18d5 (patch)
tree81fd1b8277fcb988e440cbd0babcf16ba5261e77 /libavcodec
parentca688de2c75cefcafbb739636365de1179940631 (diff)
downloadffmpeg-dc4a621e9ceb81c4c019aa7656c2bfbec2df18d5.tar.gz
avcodec/vp3: Cleanup order of operations for current_run check
This shouldnt make a difference Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vp3.c2
1 files changed, 1 insertions, 1 deletions
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;