Commit 81a64614 authored by Michael Niedermayer's avatar Michael Niedermayer

remove impossible condition from msrle_decode_pal4()

Originally committed as revision 25631 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 94ee6c10
...@@ -75,8 +75,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, ...@@ -75,8 +75,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
odd_pixel = stream_byte & 1; odd_pixel = stream_byte & 1;
rle_code = (stream_byte + 1) / 2; rle_code = (stream_byte + 1) / 2;
extra_byte = rle_code & 0x01; extra_byte = rle_code & 0x01;
if ((row_ptr + pixel_ptr + stream_byte > frame_size) || if (row_ptr + pixel_ptr + stream_byte > frame_size) {
(row_ptr < 0)) {
av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n"); av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n");
return -1; return -1;
} }
...@@ -101,8 +100,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic, ...@@ -101,8 +100,7 @@ static int msrle_decode_pal4(AVCodecContext *avctx, AVPicture *pic,
} }
} else { } else {
// decode a run of data // decode a run of data
if ((row_ptr + pixel_ptr + stream_byte > frame_size) || if (row_ptr + pixel_ptr + stream_byte > frame_size) {
(row_ptr < 0)) {
av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n"); av_log(avctx, AV_LOG_ERROR, " MS RLE: frame ptr just went out of bounds (1)\n");
return -1; return -1;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment