]> git.ipfire.org Git - thirdparty/qemu.git/commit
check-qjson: Document we expect invalid UTF-8 to be rejected
authorMarkus Armbruster <armbru@redhat.com>
Thu, 23 Aug 2018 16:39:48 +0000 (18:39 +0200)
committerMarkus Armbruster <armbru@redhat.com>
Fri, 24 Aug 2018 18:26:37 +0000 (20:26 +0200)
commita89d3104a29c400dfed4b675d6385a17223f9e0f
tree4e8c028c05e38301d8c78d88e0d5af6fca68d962
parent00ea57fadcb899b7e21079dacb47b6fb8af5b2fa
check-qjson: Document we expect invalid UTF-8 to be rejected

The JSON parser rejects some invalid sequences, but accepts others
without correcting the problem.

We should either reject all invalid sequences, or minimize overlong
sequences and replace all other invalid sequences by a suitable
replacement character.  A common choice for replacement is U+FFFD.

I'm going to implement the former.  Update the comments in
utf8_string() to expect this.

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-22-armbru@redhat.com>
tests/check-qjson.c