]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/anm.c
h264: reject unsupported 422 9 bit streams
[ffmpeg] / libavcodec / anm.c
index b84aef1c1b9fa7085eae6e79bc2f0e0320fea860..188f8296f3d1f9b92b34fa81c23d7aba8c9d0ad1 100644 (file)
@@ -79,6 +79,8 @@ static inline int op(uint8_t **dst, const uint8_t *dst_end,
         int striplen = FFMIN(count, remaining);
         if (buf) {
             striplen = FFMIN(striplen, buf_end - *buf);
+            if (*buf >= buf_end)
+                goto exhausted;
             memcpy(*dst, *buf, striplen);
             *buf += striplen;
         } else if (pixel >= 0)