262169abe7
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> |
||
---|---|---|
.. | ||
9p-handle.c | ||
9p-local.c | ||
9p-local.h | ||
9p-posix-acl.c | ||
9p-proxy.c | ||
9p-proxy.h | ||
9p-synth.c | ||
9p-synth.h | ||
9p-util.c | ||
9p-util.h | ||
9p-xattr-user.c | ||
9p-xattr.c | ||
9p-xattr.h | ||
9p.c | ||
9p.h | ||
codir.c | ||
cofile.c | ||
cofs.c | ||
coth.c | ||
coth.h | ||
coxattr.c | ||
Makefile.objs | ||
trace-events | ||
virtio-9p-device.c | ||
virtio-9p.h |