[FFmpeg-devel] [PATCH] urlconcat protocol

Michele Orrù maker.py
Fri Feb 5 08:07:50 CET 2010


>
> trailing whitespace is forbidden in our svn
> maybe you want to try our patcheck script (see tools directory in svn)
>
ok, done,


> > +    if (err < 0)
> > +        urlconcat_close(h);
> > +    else
> > +        unodes = av_realloc(unodes, udata->length * sizeof(*unodes));
> > +    return err;
>
> the new array isnt stored anywhere and the failure cases is not handled
>
> Nope.
 At line 75 we make an an an array enough long to contain all urls , but
using as size as many times AV_CAT_SEPARATOR is present on *uri (+1).
 At line 100, instead, we move to the next url (uri += len + strspn()). So,
strings like cat:foo||bar are accepted.

 In the end, we realloc *nodes in order to free all the useless space that
could be allocated due to multiple consecutive AV_CAT_SEPARATOR. But, it's
obviuos that this new size is less than the original size. So, why manage
the case of failure?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: uconcatp.patch
Type: application/octet-stream
Size: 6705 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100205/3bb5038d/attachment.obj>



More information about the ffmpeg-devel mailing list