diff -urN oldtree/lib/vsprintf.c newtree.new/lib/vsprintf.c --- oldtree/lib/vsprintf.c 2006-06-27 12:28:59.000000000 +0000 +++ newtree.new/lib/vsprintf.c 2006-06-28 12:06:17.000000000 +0000 @@ -259,7 +259,9 @@ int len; unsigned long long num; int i, base; - char *str, *end, c; + char *str; /* Where we're writing to */ + char *end; /* The last byte we can write to */ + char c; const char *s; int flags; /* flags to number() */ @@ -283,12 +285,12 @@ } str = buf; - end = buf + size; + end = buf + size - 1; /* Make sure end is always >= buf */ - if (end < buf) { + if (end < buf - 1) { end = ((void *)-1); - size = end - buf; + size = end - buf + 1; } for (; *fmt ; ++fmt) { @@ -494,7 +496,6 @@ /* the trailing null byte doesn't count towards the total */ return str-buf; } - EXPORT_SYMBOL(vsnprintf); /**