]> git.sesse.net Git - ffmpeg/commitdiff
ptx: fix inverted check for sufficient data
authorJanne Grunau <janne-libav@jannau.net>
Sat, 10 Dec 2011 15:57:32 +0000 (16:57 +0100)
committerJanne Grunau <janne-libav@jannau.net>
Sat, 10 Dec 2011 16:01:27 +0000 (17:01 +0100)
Fix regression introduced in 2b53e69.

libavcodec/ptx.c

index 75b42d50732d06ecd1ab9b5d5ac1cf1cc55288c0..fd4933c1d6fc3d99e64861ebd35ddbc6e1703ea7 100644 (file)
@@ -84,7 +84,7 @@ static int ptx_decode_frame(AVCodecContext *avctx, void *data, int *data_size,
     ptr    = p->data[0];
     stride = p->linesize[0];
 
-    for (y = 0; y < h && buf_end - buf < w * bytes_per_pixel; y++) {
+    for (y = 0; y < h && buf_end - buf >= w * bytes_per_pixel; y++) {
 #if HAVE_BIGENDIAN
         unsigned int x;
         for (x=0; x<w*bytes_per_pixel; x+=bytes_per_pixel)