diff options
author | gm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk> | 2004-08-05 10:01:27 +0000 |
---|---|---|
committer | gm281@boulderdash.cl.cam.ac.uk <gm281@boulderdash.cl.cam.ac.uk> | 2004-08-05 10:01:27 +0000 |
commit | b5deac7be19fb42d82769494cf278b6e7b33b6f7 (patch) | |
tree | 9ca9ab34baeffdb662e68b43b95c25255e4a1ab9 /xen/common/vsprintf.c | |
parent | dd04dc72620357b9884276d3157744c402def2fe (diff) | |
download | xen-b5deac7be19fb42d82769494cf278b6e7b33b6f7.tar.gz xen-b5deac7be19fb42d82769494cf278b6e7b33b6f7.tar.bz2 xen-b5deac7be19fb42d82769494cf278b6e7b33b6f7.zip |
bitkeeper revision 1.1150 (41120577g9fFRK1fSLMW6p4QnOuLrQ)
Overflows in the printing routine fixed.
Diffstat (limited to 'xen/common/vsprintf.c')
-rw-r--r-- | xen/common/vsprintf.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/xen/common/vsprintf.c b/xen/common/vsprintf.c index fd304b9391..cfda9601d1 100644 --- a/xen/common/vsprintf.c +++ b/xen/common/vsprintf.c @@ -123,7 +123,7 @@ static int skip_atoi(const char **s) #define SPECIAL 32 /* 0x */ #define LARGE 64 /* use 'ABCDEF' instead of 'abcdef' */ -static char * number(char * buf, char * end, long num, int base, int size, int precision, int type) +static char * number(char * buf, char * end, long long num, int base, int size, int precision, int type) { char c,sign,tmp[66]; const char *digits; @@ -163,7 +163,7 @@ static char * number(char * buf, char * end, long num, int base, int size, int p else { /* XXX KAF: force unsigned mod and div. */ - unsigned long num2=(unsigned long)num; + unsigned long long num2=(unsigned long long)num; unsigned int base2=(unsigned int)base; while (num2 != 0) { tmp[i++] = digits[num2%base2]; num2 /= base2; } } |