On 02/10/2015 11:22 AM, Jeff Cody wrote: > The size compared should be PATH_MAX, rather than sizeof(char *). > > Reported-by: Paolo Bonzini <pbonz...@redhat.com> > Signed-off-by: Jeff Cody <jc...@redhat.com> > --- > block/vmdk.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-)
Reviewed-by: Eric Blake <ebl...@redhat.com> > > diff --git a/block/vmdk.c b/block/vmdk.c > index 7d079ad..8410a15 100644 > --- a/block/vmdk.c > +++ b/block/vmdk.c > @@ -843,8 +843,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_open(&extent_file, extent_path, NULL, NULL, > bs->open_flags | BDRV_O_PROTOCOL, NULL, errp); > -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature