[FFmpeg-devel] [PATCH] Handling special characters in a URL.

Senthilnathan Maadasamy senthilnathan.maadasamy at gmail.com
Fri Mar 1 19:45:39 CET 2013


On Fri, Mar 1, 2013 at 11:54 PM, Carl Eugen Hoyos <cehoyos at ag.or.at> wrote:

> Senthilnathan Maadasamy <senthilnathan.maadasamy <at> gmail.com> writes:
>
> > The only case which is not correctly handled in the code is this:
> component_size > MAX_URL_SIZE & length (percent encoded URL) >
> > MAX_URL_SIZE.  In this case the returned component buffer contains
> > only the partial encoded URL and not the complete one.
>
> > I think this case is very unlikely,
>                        ^^^^^^^^^^^^^
>
> > since most of the URL (percent encoded) should be of size < 4096.
> >  Let me know if I am missing something very basic.
>
> You are missing that "very unlikely" isn't good enough
> for avoiding an out-of-array access / library crash.

Please note that even if a percent encoded URL has size > MAX_URL_SIZE it
does not result in an out-of-array access or library crash.  It gets
truncated (with length MAX_URL_SIZE) and hence the request to fetch the
file will fail.  The ugly part is that there is no error message logged.  I
can add that if you think so.  Other option is to increase MAX_URL_SIZE.
 The real problem is that RFC does not specify the maximum length of an URL.

Thanks,
Senthil


More information about the ffmpeg-devel mailing list