summaryrefslogtreecommitdiff
path: root/libavcodec/4xm.c
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2013-06-06 14:21:19 +0200
committerLuca Barbato <lu_zero@gentoo.org>2013-06-12 14:45:46 +0200
commit1f0c6075604c271d5627480f1243d22795f9a315 (patch)
tree3591f9c54629241fcdd9e1000d3882639c0f55d8 /libavcodec/4xm.c
parentb8b809908ec547b2609dbac24194f4fd2df61aea (diff)
4xm: drop pointless assert
Make sure the value of wlog2 is always between 0 and 3.
Diffstat (limited to 'libavcodec/4xm.c')
-rw-r--r--libavcodec/4xm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/4xm.c b/libavcodec/4xm.c
index 4a293ebda2..1e706448c1 100644
--- a/libavcodec/4xm.c
+++ b/libavcodec/4xm.c
@@ -327,7 +327,7 @@ static inline void mcdc(uint16_t *dst, uint16_t *src, int log2w,
}
break;
default:
- assert(0);
+ break;
}
}
@@ -343,7 +343,7 @@ static int decode_p_block(FourXContext *f, uint16_t *dst, uint16_t *src,
uint16_t *end = start + stride * (f->avctx->height - h + 1) - (1 << log2w);
int ret;
- if (code < 0 || code > 6)
+ if (code < 0 || code > 6 || log2w < 0)
return AVERROR_INVALIDDATA;
if (code == 0) {