]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/sheervideo.c
Merge commit '01f1f017d831cf14617aaaeafcec3ae3a81efce7'
[ffmpeg] / libavcodec / sheervideo.c
index 092ac6ed82cb7eb2f3ffe788d0708b737fb68687..6f99b5c86939878f3cd811c91a80a854233d69a6 100644 (file)
@@ -3105,6 +3105,11 @@ static int decode_frame(AVCodecContext *avctx,
         return AVERROR_PATCHWELCOME;
     }
 
+    if (avpkt->size < 20 + avctx->width * avctx->height / 16) {
+        av_log(avctx, AV_LOG_ERROR, "Input packet too small\n");
+        return AVERROR_INVALIDDATA;
+    }
+
     if (s->format != format) {
         if (ret < 0)
             return ret;