summaryrefslogtreecommitdiff
path: root/fpu
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2017-03-31 14:38:49 +0100
committerMax Reitz <mreitz@redhat.com>2017-04-03 17:11:40 +0200
commit6aabeb58391a33cda7e2b406adb431a5ef7e8eea (patch)
tree698309e0ac46ccc2458215b99f5e7e03b98d889c /fpu
parentd1c136885ba5b302f9781b8927a8ea2ee38cccd2 (diff)
downloadqemu-6aabeb58391a33cda7e2b406adb431a5ef7e8eea.tar.gz
qemu-io-cmds: Assert that global and nofile commands don't use ct->perms
It would be a bug for a command with the CMD_NOFILE_OK or CMD_FLAG_GLOBAL flags set to also set the ct->perms field, because the former says "OK for a file not to be open" but the latter is a check on a file. Add an assertion in qemuio_add_command() so we can catch that sort of buggy command definition immediately rather than it being a bug that only manifests when a particular set of command line options is used. (Coverity gets confused about this (CID 1371723) and reports that we might dereference a NULL blk pointer in this case, because it can't tell that that code path never happens with the cmdinfo_t that we have. This commit won't help unconfuse it, but it does fix the underlying issue.) Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1490967529-4767-1-git-send-email-peter.maydell@linaro.org Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'fpu')
0 files changed, 0 insertions, 0 deletions