summaryrefslogtreecommitdiffstats
path: root/bsd-user/netbsd/syscall_nr.h
diff options
context:
space:
mode:
authorGreg Kurz2017-03-21 09:12:47 +0100
committerGreg Kurz2017-03-21 09:12:47 +0100
commit262169abe74b4c2d8b299b7499904cfc3c1902ea (patch)
tree2194b2c74236074d6b345ee39f0f176782cfb07e /bsd-user/netbsd/syscall_nr.h
parent9pfs: don't try to flush self and avoid QEMU hang on reset (diff)
downloadqemu-262169abe74b4c2d8b299b7499904cfc3c1902ea.tar.gz
qemu-262169abe74b4c2d8b299b7499904cfc3c1902ea.tar.xz
qemu-262169abe74b4c2d8b299b7499904cfc3c1902ea.zip
9pfs: proxy: assert if unmarshal fails
Replies from the virtfs proxy are made up of a fixed-size header (8 bytes) and a payload of variable size (maximum 64kb). When receiving a reply, the proxy backend first reads the whole header and then unmarshals it. If the header is okay, it then does the same operation with the payload. Since the proxy backend uses a pre-allocated buffer which has enough room for a header and the maximum payload size, marshalling should never fail with fixed size arguments. Any error here is likely to result from a more serious corruption in QEMU and we'd better dump core right away. This patch adds error checks where they are missing and converts the associated error paths into assertions. This should also address Coverity's complaints CID 1348519 and CID 1348520, about not always checking the return value of proxy_unmarshal(). Signed-off-by: Greg Kurz <groug@kaod.org> Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Diffstat (limited to 'bsd-user/netbsd/syscall_nr.h')
0 files changed, 0 insertions, 0 deletions