]> git.sesse.net Git - vlc/commit
Improved config_chain parsing by using escape for \ " and ' (close #1952)
authorLaurent Aimar <fenrir@videolan.org>
Fri, 29 Aug 2008 10:14:48 +0000 (12:14 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Fri, 29 Aug 2008 10:14:48 +0000 (12:14 +0200)
commitce1a1d9677d22a87bbec1fa9cbba42eca549b5c3
treec9bf05cfd7fede06ccd1b69b5bc4a1a28e19b351
parent07c44496532d7e2cb58c58443b26b59c0f3c654c
Improved config_chain parsing by using escape for \ " and ' (close #1952)

It also add checks against failed malloc.

The option value should be escaped by \ for the mentionned characters and
only for them (and only one time).

For example
 dst="test \"ok\".mp3"
will assign the value
 test "ok".mp3
to the option dst.

The following one
 dst="c:\test\\'bla'bla.txt"
will assign the value
 c:\test\'bla'bla.txt

You can use the functions
- config_StringEscape (allocates memory)
- config_StringUnescape (does not allocate memory).
include/vlc_configuration.h
src/config/chain.c
src/libvlccore.sym