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

Kostya kostya.shishkov
Sun May 30 17:04:17 CEST 2010


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.



More information about the ffmpeg-devel mailing list