PulseAudio Marge Bot pushed to branch master at PulseAudio / pulseaudio
Commits: 874a6099 by Arun Raghavan at 2024-07-02T14:15:43+00:00 json: Allow non-ASCII UTF-8 strings Fixes: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1398 Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/813> - - - - - 1 changed file: - src/pulsecore/json.c Changes: ===================================== src/pulsecore/json.c ===================================== @@ -148,9 +148,10 @@ static const char* parse_string(const char *str, pa_json_object *obj) { while (*str && *str != '"') { if (*str != '\\') { - /* We only accept ASCII printable characters. */ - if (*str < 0x20 || *str > 0x7E) { - pa_log("Invalid non-ASCII character: 0x%x", (unsigned int) *str); + /* JSON specifies that ASCII control characters 0x00 through 0x1F + * must not appear in the string. */ + if (*str < 0x20) { + pa_log("Invalid ASCII character: 0x%x", (unsigned int) *str); goto error; } View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/874a609959d9db428b0aaa2be8441cc5f286e4ae -- View it on GitLab: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/874a609959d9db428b0aaa2be8441cc5f286e4ae You're receiving this email because of your account on gitlab.freedesktop.org.
