Skip to content

Commit

Permalink
allocates one more byte to get rid of buffer overrun
Browse files Browse the repository at this point in the history
  • Loading branch information
Watson1978 committed Jan 18, 2012
1 parent 291aa93 commit a7431e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util.c
Expand Up @@ -3499,7 +3499,7 @@ dtoa(double d, int mode, int ndigits, int *decpt, int *sign, char **rve)
if (i <= 0)
i = 1;
}
s = s0 = rv_alloc(i);
s = s0 = rv_alloc(i+1);

#ifdef Honor_FLT_ROUNDS
if (mode > 1 && rounding != 1)
Expand Down

0 comments on commit a7431e5

Please sign in to comment.