|
|
9ae3a8 |
From 37bf9db781d9507501649ee04d23b0dab103a126 Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Date: Mon, 15 Feb 2016 09:28:23 +0100
|
|
|
9ae3a8 |
Subject: [PATCH 10/18] block: vmdk - fixed sizeof() error
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1455528511-9357-11-git-send-email-famz@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 69176
|
|
|
9ae3a8 |
O-Subject: [RHEL-7.3 qemu-kvm PATCH 10/18] block: vmdk - fixed sizeof() error
|
|
|
9ae3a8 |
Bugzilla: 1299250
|
|
|
9ae3a8 |
RH-Acked-by: Kevin Wolf <kwolf@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Markus Armbruster <armbru@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
From: Jeff Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1299250
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
The size compared should be PATH_MAX, rather than sizeof(char *).
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Reported-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Jeff Cody <jcody@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Eric Blake <eblake@redhat.com>
|
|
|
9ae3a8 |
Reviewed-by: Max Reitz <mreitz@redhat.com>
|
|
|
9ae3a8 |
Message-id: 46d873261433f4527e88885582f96942d61758d6.1423592487.git.jcody@redhat.com
|
|
|
9ae3a8 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from commit a7be17bee855f26c317e99aa6582e1dc9b8ebd71)
|
|
|
9ae3a8 |
Signed-off-by: Fam Zheng <famz@redhat.com>
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
block/vmdk.c | 3 +--
|
|
|
9ae3a8 |
1 file changed, 1 insertion(+), 2 deletions(-)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/block/vmdk.c b/block/vmdk.c
|
|
|
9ae3a8 |
index 45ecf02..32b3d4c 100644
|
|
|
9ae3a8 |
--- a/block/vmdk.c
|
|
|
9ae3a8 |
+++ b/block/vmdk.c
|
|
|
9ae3a8 |
@@ -838,8 +838,7 @@ static int vmdk_parse_extents(const char *desc, BlockDriverState *bs,
|
|
|
9ae3a8 |
}
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
extent_path = g_malloc0(PATH_MAX);
|
|
|
9ae3a8 |
- path_combine(extent_path, sizeof(extent_path),
|
|
|
9ae3a8 |
- desc_file_path, fname);
|
|
|
9ae3a8 |
+ path_combine(extent_path, PATH_MAX, desc_file_path, fname);
|
|
|
9ae3a8 |
extent_file = NULL;
|
|
|
9ae3a8 |
ret = bdrv_file_open(&extent_file, extent_path, NULL, bs->open_flags,
|
|
|
9ae3a8 |
errp);
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|