# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1196960532 0
# Node ID 8cf7f24330ff3248557c3766166336987c530bb9
# Parent fc71e417e0ebe380dbd74099f882891430dc50fa
Fix string length check for vsnprintf() in debugtrace_printk().
Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>
xen-unstable changeset: 16484:bb31c9325d5f86629de342a6515c6f28b92cf782
xen-unstable date: Wed Nov 28 12:50:24 2007 +0000
---
xen/drivers/char/console.c | 2 +-
1 files changed, 1 insertion(+), 1 deletion(-)
diff -r fc71e417e0eb -r 8cf7f24330ff xen/drivers/char/console.c
--- a/xen/drivers/char/console.c Thu Dec 06 17:01:46 2007 +0000
+++ b/xen/drivers/char/console.c Thu Dec 06 17:02:12 2007 +0000
@@ -787,7 +787,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
|