WARNING - OLD ARCHIVES

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/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] libxl: Do not provide arbitrary string as

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] libxl: Do not provide arbitrary string as format specifier to printf.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Thu, 27 May 2010 01:45:18 -0700
Delivery-date: Thu, 27 May 2010 01:46:37 -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 Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1274945212 -3600
# Node ID 946b892a8ad7ebabb40a6004ad8d883768233834
# Parent  83a3f9556a055fbb8e5484d823e0715573e24f9e
libxl: Do not provide arbitrary string as format specifier to printf.

Original patch from Dulloor <dulloor@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir.fraser@xxxxxxxxxx>
---
 tools/libxl/xl_cmdimpl.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff -r 83a3f9556a05 -r 946b892a8ad7 tools/libxl/xl_cmdimpl.c
--- a/tools/libxl/xl_cmdimpl.c  Thu May 27 08:21:24 2010 +0100
+++ b/tools/libxl/xl_cmdimpl.c  Thu May 27 08:26:52 2010 +0100
@@ -3267,13 +3267,8 @@ int main_dmesg(int argc, char **argv)
     if (!cr)
         goto finish;
 
-    while (1) {
-        ret = libxl_xen_console_read_line(&ctx, cr, &line);
-        if (ret > 0)
-            printf(line);
-        else
-            break;
-    }
+    while ((ret = libxl_xen_console_read_line(&ctx, cr, &line)) > 0)
+        printf("%s", line);
 
 finish:
     libxl_xen_console_read_finish(&ctx, cr);

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] libxl: Do not provide arbitrary string as format specifier to printf., Xen patchbot-unstable <=