[FFmpeg-devel] Patch for issue 1973 (targa decoder crash on corrupted file)

Jean-Daniel Dupas devlists
Sun May 30 19:29:03 CEST 2010


Le 30 mai 2010 ? 17:04, Kostya a ?crit :

> On Sun, May 30, 2010 at 12:29:55PM +0200, Jean-Daniel Dupas wrote:
>> 
>> Le 29 mai 2010 ? 17:30, Kostya a ?crit :
>> 
>>> On Sat, May 29, 2010 at 05:18:44PM +0200, Jean-Daniel Dupas wrote:
>>>> 
>>>> Le 29 mai 2010 ? 16:07, Kostya a ?crit :
>>>> 
>>>>> On Sat, May 29, 2010 at 01:56:44PM +0200, Jean-Daniel Dupas wrote:
>>>>>> Hello,
>>>>>> 
>>>>>> This is a tentative patch to fix some crash in the targa parser.
>>>>>> Can someone review it ? 
>>>>>> Thanks.
>>>>> 
>>>>> In principle patch ok, but there are few nits:
>>>>> * you break existing long lines in your patch - like RLE function
>>>>> definition. That's good but should belong to other patch.
>>>> 
>>>> Event if this patch add a new argument ? 
>>> 
>>> And changes return type, yes. Change things in principle first, reformat
>>> in the following patch.
>>> 
>>>>> * why bother with buf_size while you can just have one constant buf_end
>>>>> and check buf + size <= buf_end ?
>>>> 
>>>> Good point.
>>> 
>>> Looks like it got a bit smaller as well.
>>> 
>>> Now you have to deal with tabs and/or stray spaces and indentation. It's
>>> not allowed in SVN.
>>> If that is done can somebody please test this patch on existing samples
>>> and apply it? I just can't do that (yet).
>> 
>> 
>> White space cleaned up.
> 
> Still there is weird indentation of two spaces on some lines. And in
> your check macro "return -1" is missing 4 spaces on indent.

Sorry for that. This time I hope it's good.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: tga_check.patch
Type: application/octet-stream
Size: 4634 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100530/67d85faa/attachment.obj>
-------------- next part --------------


-- Jean-Daniel







More information about the ffmpeg-devel mailing list