Properly size buffer to avoid overflow.

This commit is contained in:
wkj 2005-11-01 15:27:28 +00:00
parent 604ad4d8ff
commit 14367520a2

View file

@ -376,7 +376,7 @@ found:
static int
floatfmt(Fmt *fmt, double f)
{
char s[FDIGIT+10];
char s[341]; /* precision+exponent+sign+'.'+null */
xdtoa(fmt, s, f);
fmt->flags &= FmtWidth|FmtLeft;