aboutsummaryrefslogtreecommitdiff
path: root/qobject/json-lexer.c
diff options
context:
space:
mode:
authorMarkus Armbruster <armbru@redhat.com>2018-08-23 18:39:52 +0200
committerMarkus Armbruster <armbru@redhat.com>2018-08-24 20:26:37 +0200
commit4b1c0cd7c7f9f9cf2e46c0a9c9cd88b2cba3decd (patch)
tree5841258a3a8fd1fff3aeb2f70f3c68e308c68b8b /qobject/json-lexer.c
parentde930f45cb56ccf7535cbacee3f3686d416f5283 (diff)
downloadqemu-4b1c0cd7c7f9f9cf2e46c0a9c9cd88b2cba3decd.zip
qemu-4b1c0cd7c7f9f9cf2e46c0a9c9cd88b2cba3decd.tar.gz
qemu-4b1c0cd7c7f9f9cf2e46c0a9c9cd88b2cba3decd.tar.bz2
json: Accept overlong \xC0\x80 as U+0000 ("modified UTF-8")
Since the JSON grammer doesn't accept U+0000 anywhere, this merely exchanges one kind of parse error for another. It's purely for consistency with qobject_to_json(), which accepts \xC0\x80 (see commit e2ec3f97680). Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Message-Id: <20180823164025.12553-26-armbru@redhat.com>
Diffstat (limited to 'qobject/json-lexer.c')
-rw-r--r--qobject/json-lexer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qobject/json-lexer.c b/qobject/json-lexer.c
index 93fa273..4c402f6 100644
--- a/qobject/json-lexer.c
+++ b/qobject/json-lexer.c
@@ -93,7 +93,7 @@
* interpolation = %((l|ll|I64)[du]|[ipsf])
*
* Note:
- * - Input must be encoded in UTF-8.
+ * - Input must be encoded in modified UTF-8.
* - Decoding and validating is left to the parser.
*/