summaryrefslogtreecommitdiff
path: root/libavcodec/speedhq.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/speedhq.c')
-rw-r--r--libavcodec/speedhq.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/speedhq.c b/libavcodec/speedhq.c
index 5861b7f6b5..711bcd66d7 100644
--- a/libavcodec/speedhq.c
+++ b/libavcodec/speedhq.c
@@ -498,7 +498,7 @@ static int speedhq_decode_frame(AVCodecContext *avctx,
uint32_t second_field_offset;
int ret;
- if (buf_size < 4)
+ if (buf_size < 4 || avctx->width < 8)
return AVERROR_INVALIDDATA;
quality = buf[0];