From: Guido van Rossum Date: Tue, 14 Jan 1997 15:43:41 +0000 (+0000) Subject: Increased buffer sizes used by hex() and oct() -- on 64-bit or 128-bit X-Git-Tag: v1.5a1~524 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6f72f97c036bcc0779dc597a935b7250c55d1e8d;p=python Increased buffer sizes used by hex() and oct() -- on 64-bit or 128-bit machines, the string may get longer than 20 characters! --- diff --git a/Objects/intobject.c b/Objects/intobject.c index 76d914584d..1f1298f0a2 100644 --- a/Objects/intobject.c +++ b/Objects/intobject.c @@ -721,7 +721,7 @@ static object * int_oct(v) intobject *v; { - char buf[20]; + char buf[100]; long x = v -> ob_ival; if (x == 0) strcpy(buf, "0"); @@ -734,7 +734,7 @@ static object * int_hex(v) intobject *v; { - char buf[20]; + char buf[100]; long x = v -> ob_ival; sprintf(buf, "0x%lx", x); return newstringobject(buf);