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] Fix string length check for vsnprintf() i

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Fix string length check for vsnprintf() in debugtrace_printk().
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 28 Nov 2007 17:20:09 -0800
Delivery-date: Wed, 28 Nov 2007 17:20:43 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
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/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/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 1196254224 0
# Node ID bb31c9325d5f86629de342a6515c6f28b92cf782
# Parent  43b7d24acf9c05d557fd0623ab6e495e630cf0d0
Fix string length check for vsnprintf() in debugtrace_printk().
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
---
 xen/drivers/char/console.c |    2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r 43b7d24acf9c -r bb31c9325d5f xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Wed Nov 28 12:44:46 2007 +0000
+++ b/xen/drivers/char/console.c        Wed Nov 28 12:50:24 2007 +0000
@@ -835,7 +835,7 @@ void debugtrace_printk(const char *fmt, 
     snprintf(buf, sizeof(buf), "%u ", ++count);
 
     va_start(args, fmt);
-    (void)vsnprintf(buf + strlen(buf), sizeof(buf), fmt, args);
+    (void)vsnprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), fmt, args);
     va_end(args);
 
     if ( debugtrace_send_to_console )

_______________________________________________
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] Fix string length check for vsnprintf() in debugtrace_printk()., Xen patchbot-unstable <=