We reject bytes that can't occur in valid UTF-8 (\xC0..\xC1,
\xF5..\xFF in the lexer. That's insufficient; there's plenty of
invalid UTF-8 not containing these bytes, as demonstrated by
check-qjson:
* Malformed sequences
- Unexpected continuation bytes
- Missing continuation bytes after start bytes other than
\xC0..\xC1, \xF5..\xFD.
* Overlong sequences with start bytes other than \xC0..\xC1,
\xF5..\xFD.
* Invalid code points
Fixing this in the lexer would be bothersome. Fixing it in the parser
is straightforward, so do that.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20180823164025.12553-23-armbru@redhat.com>
|
||
|---|---|---|
| .. | ||
| acl.c | ||
| aio-posix.c | ||
| aio-wait.c | ||
| aio-win32.c | ||
| aiocb.c | ||
| async.c | ||
| base64.c | ||
| bitmap.c | ||
| bitops.c | ||
| buffer.c | ||
| bufferiszero.c | ||
| cacheinfo.c | ||
| compatfd.c | ||
| coroutine-sigaltstack.c | ||
| coroutine-ucontext.c | ||
| coroutine-win32.c | ||
| crc32c.c | ||
| cutils.c | ||
| envlist.c | ||
| error.c | ||
| event_notifier-posix.c | ||
| event_notifier-win32.c | ||
| fifo8.c | ||
| getauxval.c | ||
| hbitmap.c | ||
| hexdump.c | ||
| host-utils.c | ||
| id.c | ||
| iohandler.c | ||
| iov.c | ||
| iova-tree.c | ||
| keyval.c | ||
| lockcnt.c | ||
| log.c | ||
| main-loop.c | ||
| Makefile.objs | ||
| memfd.c | ||
| mmap-alloc.c | ||
| module.c | ||
| notify.c | ||
| osdep.c | ||
| oslib-posix.c | ||
| oslib-win32.c | ||
| pagesize.c | ||
| path.c | ||
| qdist.c | ||
| qemu-config.c | ||
| qemu-coroutine-io.c | ||
| qemu-coroutine-lock.c | ||
| qemu-coroutine-sleep.c | ||
| qemu-coroutine.c | ||
| qemu-error.c | ||
| qemu-openpty.c | ||
| qemu-option.c | ||
| qemu-progress.c | ||
| qemu-sockets.c | ||
| qemu-thread-common.h | ||
| qemu-thread-posix.c | ||
| qemu-thread-win32.c | ||
| qemu-timer-common.c | ||
| qemu-timer.c | ||
| qht.c | ||
| qsp.c | ||
| range.c | ||
| rcu.c | ||
| readline.c | ||
| stats64.c | ||
| sys_membarrier.c | ||
| systemd.c | ||
| thread-pool.c | ||
| throttle.c | ||
| timed-average.c | ||
| trace-events | ||
| unicode.c | ||
| uri.c | ||
| uuid.c | ||
| vfio-helpers.c | ||