core-util: Handle zero-length volume string
authorTanu Kaskinen <tanuk@iki.fi>
Fri, 27 Dec 2019 05:33:52 +0000 (07:33 +0200)
committerTanu Kaskinen <tanuk@iki.fi>
Fri, 27 Dec 2019 05:33:52 +0000 (07:33 +0200)
commit4dba56c1af96b4b93574a18e878d054e70bcaa62
treeba7cb524d90d15b4af4cc1ca168f7f8271976bbe
parentcd4a69374cefe7c720bd6916f06ff7151da9892a
core-util: Handle zero-length volume string

Without checking for zero we end up accessing memory outside the str
buffer: str[len - 1].

Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/issues/768
src/pulsecore/core-util.c