qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Jeff Cody <jcody@redhat.com>, qemu-devel@nongnu.org
Cc: kwolf@redhat.com, pbonzini@redhat.com, famz@redhat.com,
	stefanha@redhat.com
Subject: Re: [Qemu-devel] [PATCH] block: vmdk - fixed sizeof() error
Date: Tue, 10 Feb 2015 14:10:21 -0700	[thread overview]
Message-ID: <54DA73BD.2040506@redhat.com> (raw)
In-Reply-To: <46d873261433f4527e88885582f96942d61758d6.1423592487.git.jcody@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1094 bytes --]

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 <pbonzini@redhat.com>
> Signed-off-by: Jeff Cody <jcody@redhat.com>
> ---
>  block/vmdk.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)

Reviewed-by: Eric Blake <eblake@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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 604 bytes --]

  reply	other threads:[~2015-02-10 21:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 18:22 [Qemu-devel] [PATCH] block: vmdk - fixed sizeof() error Jeff Cody
2015-02-10 21:10 ` Eric Blake [this message]
2015-02-10 21:42 ` Max Reitz
2015-02-12 17:15 ` Stefan Hajnoczi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54DA73BD.2040506@redhat.com \
    --to=eblake@redhat.com \
    --cc=famz@redhat.com \
    --cc=jcody@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).