]> git.proxmox.com Git - mirror_qemu.git/commit
block: fix off-by-one error in qcow and qcow2
authorJeff Cody <jcody@redhat.com>
Tue, 27 Jan 2015 13:33:55 +0000 (08:33 -0500)
committerKevin Wolf <kwolf@redhat.com>
Fri, 6 Feb 2015 16:24:21 +0000 (17:24 +0100)
commite729fa6afed3aa917287b63034244f548b79ec60
tree8bb0af56cc2acc5f5145b53f7f91bb8cba2a42cd
parent319fc53e344d5cead970c74f088ae5c607d426b3
block: fix off-by-one error in qcow and qcow2

This fixes an off-by-one error introduced in 9a29e18.  Both qcow and
qcow2 need to make sure to leave room for string terminator '\0' for
the backing file, so the max length of the non-terminated string is
either 1023 or PATH_MAX - 1.

Reported-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow.c
block/qcow2.c