All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] virtio-9p: Make sure -virtfs option works correctly
@ 2010-09-02 16:17 Aneesh Kumar K.V
  2010-09-04 10:07 ` Blue Swirl
  0 siblings, 1 reply; 2+ messages in thread
From: Aneesh Kumar K.V @ 2010-09-02 16:17 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, Aneesh Kumar K.V

When making copy of arguments we were doing partial copy

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 vl.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/vl.c b/vl.c
index 9f7358e..df11ab3 100644
--- a/vl.c
+++ b/vl.c
@@ -2332,7 +2332,7 @@ int main(int argc, char **argv, char **envp)
                 len += strlen(qemu_opt_get(opts, "security_model"));
                 arg_fsdev = qemu_malloc((len + 1) * sizeof(*arg_fsdev));
 
-                snprintf(arg_fsdev, len * sizeof(*arg_fsdev),
+                snprintf(arg_fsdev, (len + 1) * sizeof(*arg_fsdev),
                          "%s,id=%s,path=%s,security_model=%s",
                          qemu_opt_get(opts, "fstype"),
                          qemu_opt_get(opts, "mount_tag"),
@@ -2343,7 +2343,7 @@ int main(int argc, char **argv, char **envp)
                 len += 2*strlen(qemu_opt_get(opts, "mount_tag"));
                 arg_9p = qemu_malloc((len + 1) * sizeof(*arg_9p));
 
-                snprintf(arg_9p, len * sizeof(*arg_9p),
+                snprintf(arg_9p, (len + 1) * sizeof(*arg_9p),
                          "virtio-9p-pci,fsdev=%s,mount_tag=%s",
                          qemu_opt_get(opts, "mount_tag"),
                          qemu_opt_get(opts, "mount_tag"));
-- 
1.7.0.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [Qemu-devel] [PATCH] virtio-9p: Make sure -virtfs option works correctly
  2010-09-02 16:17 [Qemu-devel] [PATCH] virtio-9p: Make sure -virtfs option works correctly Aneesh Kumar K.V
@ 2010-09-04 10:07 ` Blue Swirl
  0 siblings, 0 replies; 2+ messages in thread
From: Blue Swirl @ 2010-09-04 10:07 UTC (permalink / raw)
  To: Aneesh Kumar K.V; +Cc: aliguori, qemu-devel

Thanks, applied.

On Thu, Sep 2, 2010 at 4:17 PM, Aneesh Kumar K.V
<aneesh.kumar@linux.vnet.ibm.com> wrote:
> When making copy of arguments we were doing partial copy
>
> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
> ---
>  vl.c |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 9f7358e..df11ab3 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2332,7 +2332,7 @@ int main(int argc, char **argv, char **envp)
>                 len += strlen(qemu_opt_get(opts, "security_model"));
>                 arg_fsdev = qemu_malloc((len + 1) * sizeof(*arg_fsdev));
>
> -                snprintf(arg_fsdev, len * sizeof(*arg_fsdev),
> +                snprintf(arg_fsdev, (len + 1) * sizeof(*arg_fsdev),
>                          "%s,id=%s,path=%s,security_model=%s",
>                          qemu_opt_get(opts, "fstype"),
>                          qemu_opt_get(opts, "mount_tag"),
> @@ -2343,7 +2343,7 @@ int main(int argc, char **argv, char **envp)
>                 len += 2*strlen(qemu_opt_get(opts, "mount_tag"));
>                 arg_9p = qemu_malloc((len + 1) * sizeof(*arg_9p));
>
> -                snprintf(arg_9p, len * sizeof(*arg_9p),
> +                snprintf(arg_9p, (len + 1) * sizeof(*arg_9p),
>                          "virtio-9p-pci,fsdev=%s,mount_tag=%s",
>                          qemu_opt_get(opts, "mount_tag"),
>                          qemu_opt_get(opts, "mount_tag"));
> --
> 1.7.0.4
>
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-09-04 10:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-09-02 16:17 [Qemu-devel] [PATCH] virtio-9p: Make sure -virtfs option works correctly Aneesh Kumar K.V
2010-09-04 10:07 ` Blue Swirl

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.