]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/ptx.c
avfilter/avfilter: Remove compatibility code for old filter options
[ffmpeg] / libavcodec / ptx.c
index 42147f4afce6d55742d26955cd4d6b9394ccaa03..19f9305cda09fe60f01a4e4b1e5b175654f0ebfb 100644 (file)
@@ -55,6 +55,9 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
 
     buf += offset;
 
+    if (buf_end - buf < w * bytes_per_pixel)
+        return AVERROR_INVALIDDATA;
+
     if ((ret = ff_set_dimensions(avctx, w, h)) < 0)
         return ret;