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