Properly size buffer to avoid overflow.
This commit is contained in:
parent
604ad4d8ff
commit
14367520a2
1 changed files with 1 additions and 1 deletions
|
|
@ -376,7 +376,7 @@ found:
|
||||||
static int
|
static int
|
||||||
floatfmt(Fmt *fmt, double f)
|
floatfmt(Fmt *fmt, double f)
|
||||||
{
|
{
|
||||||
char s[FDIGIT+10];
|
char s[341]; /* precision+exponent+sign+'.'+null */
|
||||||
|
|
||||||
xdtoa(fmt, s, f);
|
xdtoa(fmt, s, f);
|
||||||
fmt->flags &= FmtWidth|FmtLeft;
|
fmt->flags &= FmtWidth|FmtLeft;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue