On 08/08/2018 07:03 AM, Markus Armbruster wrote:
The JSON parser translates invalid \uXXXX to garbage instead of
rejecting it, and swallows \u0000.

Fix by using mod_utf8_encode() instead of flawed wchar_to_utf8().

Valid surrogate pairs are now differently broken: they're rejected
instead of translated to garbage.  The next commit will fix them.

Signed-off-by: Markus Armbruster <arm...@redhat.com>
---
  qobject/json-parser.c | 35 ++++++-----------------------------
  tests/check-qjson.c   | 32 +++++++++-----------------------
  2 files changed, 15 insertions(+), 52 deletions(-)


Reviewed-by: Eric Blake <ebl...@redhat.com>

--
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org

Reply via email to