[vlc-devel] [PATCH] M3u & pls demux: Check the size of each file line to prevent flooding the playlist.

Rémi Denis-Courmont remi at remlab.net
Wed Apr 24 18:28:36 CEST 2013


Le mercredi 24 avril 2013 14:51:56, Adrien Maglo a écrit :
> On 24/04/2013 13:40, Rémi Denis-Courmont wrote:
> > On Wed, 24 Apr 2013 13:30:23 +0200, Adrien Maglo <magsoft at videolan.org>
> > 
> > wrote:
> >> Here is a new version of the patch with 4096 as the maximum line size.
> > 
> > Well no. Not only does this fail to address a number of other parsers,
> > but VLC still tries to allocate a huge memory block to read the URL. So
> > AFAIK the bug is not at all fixed.
> 
> The size of the allocated buffer is already limited in the
> stream_ReadLine() function to STREAM_LINE_MAX = 2048*100
> (src/input/stream.c).
> This threshold is however still too large to output correctly the media
> path, or maybe more generally transmit it to the playlist.

Why?

Performance problem aside, an URL of 200kiB should not be a problem. If it is, 
then something needs fixing anyway. That is most certainly not the native 
playlist demuxer.

By the way, while most do, not all item URLs come directly or indirectly from 
stream_ReadLine().

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list