[vlc-devel] [PATCH] M3u & pls demux: Check the size of each file line to prevent flooding the playlist.
Adrien Maglo
magsoft at videolan.org
Wed Apr 24 13:51:56 CEST 2013
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.
An alternative solution could be to create a function
char *stream_ReadLine( stream_t *s, unsigned i_maxLineSize ).
I am open to any other suggestion.
--
MagSoft
More information about the vlc-devel
mailing list