summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2017-08-09 15:38:06 -0500
committerKevin Wolf <kwolf@redhat.com>2017-09-04 18:33:00 +0200
commitd7a753a148d4738eef95a3b193b081a9c905399f (patch)
tree0ca51f42a2bca13a616270305283a1d375f65403 /include
parent56439e9d55626b65ecb887f1ac3714652555312e (diff)
qcow: Check failure of bdrv_getlength() and bdrv_truncate()
Omitting the check for whether bdrv_getlength() and bdrv_truncate() failed meant that it was theoretically possible to return an incorrect offset to the caller. More likely, conditions for either of these functions to fail would also cause one of our other calls (such as bdrv_pread() or bdrv_pwrite_sync()) to also fail, but auditing that we are safe is difficult compared to just patching things to always forward on the error rather than ignoring it. Use osdep.h macros instead of open-coded rounding while in the area. Reported-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Eric Blake <eblake@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions