All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] libxl: correct allocation size in libxl_list_nics
@ 2011-07-14 15:59 Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2011-07-14 15:59 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1310646155 -3600
# Node ID 725f44036b337a464866b3762d1136702ee05473
# Parent  ff377f962b911578d4e5a7d4e700e74e7891b841
libxl: correct allocation size in libxl_list_nics

The function returns a list of libxl_nicinfo not libxl_device_nic.

Causes memory corruption on free.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r ff377f962b91 -r 725f44036b33 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Jul 14 13:22:35 2011 +0100
+++ b/tools/libxl/libxl.c	Thu Jul 14 13:22:35 2011 +0100
@@ -1287,7 +1287,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx
                            libxl__sprintf(&gc, "%s/device/vif", dompath), &nb_nics);
     if (!l)
         goto err;
-    nics = res = calloc(nb_nics, sizeof (libxl_device_nic));
+    nics = res = calloc(nb_nics, sizeof (libxl_nicinfo));
     if (!res)
         goto err;
     for (*nb = nb_nics; nb_nics > 0; --nb_nics, ++l, ++nics) {

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

* Re: [PATCH] libxl: correct allocation size in libxl_list_nics
  2011-09-21 13:54 Ian Campbell
@ 2011-09-28 15:35 ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2011-09-28 15:35 UTC (permalink / raw)
  To: Ian Campbell; +Cc: xen-devel

Ian Campbell writes ("[Xen-devel] [PATCH] libxl: correct allocation size in libxl_list_nics"):
> libxl: correct allocation size in libxl_list_nics

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>

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

* [PATCH] libxl: correct allocation size in libxl_list_nics
@ 2011-09-21 13:54 Ian Campbell
  2011-09-28 15:35 ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Ian Campbell @ 2011-09-21 13:54 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1316609964 -3600
# Node ID b11af4a5cdc6a94e41a81d456f07b4d70cdb5ffe
# Parent  b43fd821d1aebc8671e684bfc285cda7a6002ff1
libxl: correct allocation size in libxl_list_nics

The function returns a list of libxl_nicinfo not libxl_device_nic.

Causes memory corruption on free.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r b43fd821d1ae -r b11af4a5cdc6 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Wed Sep 21 13:59:24 2011 +0100
+++ b/tools/libxl/libxl.c	Wed Sep 21 13:59:24 2011 +0100
@@ -1296,7 +1296,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx
                            libxl__sprintf(&gc, "%s/device/vif", dompath), &nb_nics);
     if (!l)
         goto err;
-    nics = res = calloc(nb_nics, sizeof (libxl_device_nic));
+    nics = res = calloc(nb_nics, sizeof (libxl_nicinfo));
     if (!res)
         goto err;
     for (*nb = nb_nics; nb_nics > 0; --nb_nics, ++l, ++nics) {

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

* [PATCH] libxl: correct allocation size in libxl_list_nics
@ 2011-06-23 15:34 Ian Campbell
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Campbell @ 2011-06-23 15:34 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell

# HG changeset patch
# User Ian Campbell <ian.campbell@citrix.com>
# Date 1308843248 -3600
# Node ID 18476e67178555b92b9bf893a3c550a9095caef8
# Parent  13048e166ab661e32269cd3abf8737a52e6229dd
libxl: correct allocation size in libxl_list_nics

The function returns a list of libxl_nicinfo not libxl_device_nic.

Causes memory corruption on free.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>

diff -r 13048e166ab6 -r 18476e671785 tools/libxl/libxl.c
--- a/tools/libxl/libxl.c	Thu Jun 23 15:26:59 2011 +0100
+++ b/tools/libxl/libxl.c	Thu Jun 23 16:34:08 2011 +0100
@@ -1356,7 +1356,7 @@ libxl_nicinfo *libxl_list_nics(libxl_ctx
                            libxl__sprintf(&gc, "%s/device/vif", dompath), &nb_nics);
     if (!l)
         goto err;
-    nics = res = calloc(nb_nics, sizeof (libxl_device_nic));
+    nics = res = calloc(nb_nics, sizeof (libxl_nicinfo));
     if (!res)
         goto err;
     for (*nb = nb_nics; nb_nics > 0; --nb_nics, ++l, ++nics) {

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

end of thread, other threads:[~2011-09-28 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 15:59 [PATCH] libxl: correct allocation size in libxl_list_nics Ian Campbell
  -- strict thread matches above, loose matches on Subject: below --
2011-09-21 13:54 Ian Campbell
2011-09-28 15:35 ` Ian Jackson
2011-06-23 15:34 Ian Campbell

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.