[MPlayer-dev-eng] [PATCH] Plaintext playlist parsing

Ingo Brückl ib at wupperonline.de
Tue May 22 23:18:48 CEST 2012


Reimar Döffinger wrote on Tue, 22 May 2012 19:57:09 +0200:

> On Tue, May 22, 2012 at 11:18:44AM +0200, Ingo Brückl wrote:
>> I wrote on Tue, 22 May 2012 00:24:34 +0200:
>>
>> > Is this patch ok or should it be somehow restricted to the GUI (use_gui)?
>>
>> Yeah, I think
>>
>>   entry      = parse_playtree(mpctx->stream, use_gui);
>>
>> is probably much better, because it doesn't change the current (non-GUI)
>> behaviour.

> I am not sure this is a good idea at all, even for the GUI.
> The problem is that there is no sanity checking at all for plain text
> playlist.
> Imagine if someone by accident gets a DVD image in there, I am sure
> really bad things will happen (like a few million or so playlist
> entries, using up loads of memory, swapping, possibly even
> out-of-memory crashes).

I'm aware of this, but since this additional plain text playlist parsing will
only happen if the user selects from the "Playlists" filter of the file
selector it's up to him to deal with the consequences if he selects something
that is not a playlist (but having a playlist extension, as the selection is
limited). There isn't much more that (security-wise) can be done in order to
allow playlists with the GUI. (And if you're using option -playlist by
accident with a DVD image and plain MPlayer, well, the same bad things will
happen.)

The "Playlists" filter is the GUI's equivalent to the -playlist option.

> (since I don't use gmplayer I don't really care, but still).

I really get your point and share your concerns, but I think the limitation
to the "Playlists" filter for this feature makes the risks acceptable.

So, ok to commit?

Ingo


More information about the MPlayer-dev-eng mailing list