aboutsummaryrefslogtreecommitdiffstats
path: root/xen/common/vsprintf.c
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2007-12-28 15:23:28 +0000
committerKeir Fraser <keir.fraser@citrix.com>2007-12-28 15:23:28 +0000
commit8f8a3b56592acf31ffcbf6b6747e247dd53da355 (patch)
tree6b7fdf56e3ede7cdb83d04371171a34b1fc2de37 /xen/common/vsprintf.c
parentf53513b012968240ba490efe873982d213a85d46 (diff)
downloadxen-8f8a3b56592acf31ffcbf6b6747e247dd53da355.tar.gz
xen-8f8a3b56592acf31ffcbf6b6747e247dd53da355.tar.bz2
xen-8f8a3b56592acf31ffcbf6b6747e247dd53da355.zip
In C99 (7.19.6.2.10), the behavior of scanf("stuff... %n", ..., &n) is
said to be undefined if the value to be put is n can't fit. I guess we can safely consider that the same applies to printf. Signed-off-by: Samuel Thibault <samuel.thibault@citrix.com>
Diffstat (limited to 'xen/common/vsprintf.c')
-rw-r--r--xen/common/vsprintf.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c
index 7c2d5057e2..5ee5f4efce 100644
--- a/xen/common/vsprintf.c
+++ b/xen/common/vsprintf.c
@@ -404,8 +404,6 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
case 'n':
- /* FIXME:
- * What does C99 say about the overflow case here? */
if (qualifier == 'l') {
long * ip = va_arg(args, long *);
*ip = (str - buf);
@@ -424,7 +422,7 @@ int vsnprintf(char *buf, size_t size, const char *fmt, va_list args)
++str;
continue;
- /* integer number formats - set up the flags and "break" */
+ /* integer number formats - set up the flags and "break" */
case 'o':
base = 8;
break;