[FFmpeg-devel] [PATCH] urlconcat protocol
Fri Feb 5 12:39:32 CET 2010
2010/2/5 Michael Niedermayer <michaelni at gmx.at>
> On Fri, Feb 05, 2010 at 08:07:50AM +0100, Michele Orr? wrote:
> > >
> > > 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 *
> > > > + 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()).
> > strings like cat:foo||bar are accepted.
> > In the end, we realloc *nodes in order to free all the useless space
> > could be allocated due to multiple consecutive AV_CAT_SEPARATOR. But,
> > obviuos that this new size is less than the original size. So, why manage
> > the case of failure?
> Nothing gurantees that a realloc() reducing the size of an array succeed
> And id be surprised if there is no place where realloc() is implemented as
> a malloc();memcpy();free(); which certainly can fail
> also the smaller unodes may be at a different place in memory
> Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
> The real ebay dictionary, page 1
> "Used only once" - "Some unspecified defect prevented a second use"
> "In good condition" - "Can be repaird by experienced expert"
> "As is" - "You wouldnt want it even if you were payed for it, if you knew
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
> -----END PGP SIGNATURE-----
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 6797 bytes
Desc: not available
More information about the ffmpeg-devel