conf: fix invalid memory access in strip_spaces()
authorDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 21 Jul 2012 18:12:00 +0000 (20:12 +0200)
committerDavid Herrmann <dh.herrmann@googlemail.com>
Sat, 21 Jul 2012 18:12:00 +0000 (20:12 +0200)
commit52fa0f80d9b65c7e8d3f2b377fe89ba8e828503b
tree5feee3096dd9432005450b877a76377482ba67d6
parent741b8d33dfb3a9e5bb3b322db5f5e06d360a8024
conf: fix invalid memory access in strip_spaces()

We must not assume that the string is longer than 0 characters. Therefore,
check whether we would access invalid memory before the string when
removing trailing whitespaces.

Signed-off-by: David Herrmann <dh.herrmann@googlemail.com>
src/conf.c