summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/speedhq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 743dacc6ce..128663ab75 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -497,7 +497,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx,
uint32_t second_field_offset;
int ret;
- if (buf_size < 4 || avctx->width < 8)
+ if (buf_size < 4 || avctx->width < 8 || avctx->width % 8 != 0)
return AVERROR_INVALIDDATA;
quality = buf[0];