[Ffmpeg-devel] qtrle bug

Mike Melanson mike
Wed Oct 12 16:31:28 CEST 2005


Reimar D?ffinger wrote:
> Hi,
> On Wed, Oct 12, 2005 at 11:51:41AM +0200, matthieu castet wrote:
> 
>>Ok, I found the bug,
>>
>>rle_code was an signed char, and when it was '*4' in the check it 
>>overflow and become negative.
>>
>>This patch fixes the bug.
> 
> 
> I think this is correct, esp. since the 4bpp and 8bpp already define
> rle_code as int.
> Though there is one difference between those places:
> 4bpp and 8bpp variants actually have
> 
>>rle_code *= 4;
> 
> whereas the other variants only have things like
> 
>>CHECK_STREAM_PTR(rle_code * 4);
>>CHECK_PIXEL_PTR(rle_code * 4);
> 
> so maybe these macros are wrong?

	Entirely possible. As memory serves, I was only ever able to verify 8-, 
16-, 24-, and 32-bit QT RLE variants. I could never be sure of 1-, 2-, 
and 4-bit. QT RLE supports a crazy number of pixel formats.

-- 
	-Mike Melanson





More information about the ffmpeg-devel mailing list