mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-11 13:30:02 -05:00
json: Correctly handle bad strings with missing closing quotes
Also add a test for this case. Signed-off-by: Arun Raghavan <arun@arunraghavan.net>
This commit is contained in:
parent
c692ec3afd
commit
708b4aac91
2 changed files with 14 additions and 1 deletions
|
|
@ -122,7 +122,7 @@ static const char* parse_string(const char *str, pa_json_object *obj) {
|
|||
|
||||
str++; /* Consume leading '"' */
|
||||
|
||||
while (*str != '"') {
|
||||
while (*str && *str != '"') {
|
||||
if (*str != '\\') {
|
||||
/* We only accept ASCII printable characters. */
|
||||
if (*str < 0x20 || *str > 0x7E) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue