[MPlayer-dev-eng] [PATCH] Use unrar for open vobsubs if available

Rich Felker dalias at aerifal.cx
Sat Nov 24 18:27:13 CET 2007


On Sat, Nov 24, 2007 at 10:08:51AM +0200, ods15 at ods15.dyndns.org wrote:
> Using a shell in general for this is a bad idea. But the correct way to 
> quote a string for a shell is replace all ' with '\'', and put '' around 
> the string. using "" is a bad idea because it can still use `` and $()

Another safe method is to use "" quoting and put a \ before EVERY
character of the string. I.e. hello becomes "\h\e\l\l\o" and my`'pass
becomes "\m\y\`\\'\p\a\s\s".

However I maintain that calling commands via the shell is
fundamentally risky and bogus. Use fork(2) and exec*(2) functions.

Rich



More information about the MPlayer-dev-eng mailing list