This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-changelog] [xen-unstable] xl: fix strtok() call in vif2 parsing

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] xl: fix strtok() call in vif2 parsing
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 26 Aug 2010 03:31:09 -0700
Delivery-date: Thu, 26 Aug 2010 03:36:02 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Andre Przywara <andre.przywara@xxxxxxx>
# Date 1282670300 -3600
# Node ID b1801cce513876cee5df4bf0c417820fe5c9b291
# Parent  a67b98978f5b41d69ded8901ec1bdfe9dd0b007c
xl: fix strtok() call in vif2 parsing

Fix fixes a hang when parsing the vif2 parameter.

According to the manpage subsequent calls to strtok() must use
NULL in the string parameter to keep the iteration going.

Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx>
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r a67b98978f5b -r b1801cce5138 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Tue Aug 24 16:15:56 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Tue Aug 24 18:18:20 2010 +0100
@@ -883,7 +883,7 @@ skip:
             init_net2_info(net2, d_config->num_vif2s);
-            for (p = strtok(buf2, ","); p; p = strtok(buf2, ",")) {
+            for (p = strtok(buf2, ","); p; p = strtok(NULL, ",")) {
                 while (isblank(*p))
                 if (!strncmp("front_mac=", p, 10)) {

Xen-changelog mailing list

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] xl: fix strtok() call in vif2 parsing, Xen patchbot-unstable <=