summaryrefslogtreecommitdiff
path: root/libavcodec/ptx.c
diff options
context:
space:
mode:
authorJanne Grunau <janne-libav@jannau.net>2011-12-10 16:57:32 +0100
committerJanne Grunau <janne-libav@jannau.net>2011-12-10 17:01:27 +0100
commit8d61eef917f736ebd4bc23c36d1b0cb3934e7dd6 (patch)
tree2c60f38607a94d4809c317c67e9057f41e5cce25 /libavcodec/ptx.c
parent28101f6c4eb341fca0c3f7e237f8236b0fde9530 (diff)
ptx: fix inverted check for sufficient data
Fix regression introduced in 2b53e69.
Diffstat (limited to 'libavcodec/ptx.c')
-rw-r--r--libavcodec/ptx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/ptx.c b/libavcodec/ptx.c
index 75b42d5073..fd4933c1d6 100644
--- a/libavcodec/ptx.c
+++ b/libavcodec/ptx.c
@@ -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)