plan9port

fork of plan9port with libvec, libstr and libsdb
Log | Files | Refs | README | LICENSE

commit 14367520a219d579ff96ef610cf113859285d324
parent 604ad4d8ff971314f37440963f4ad8e6ea79aacc
Author: wkj <devnull@localhost>
Date:   Tue,  1 Nov 2005 15:27:28 +0000

Properly size buffer to avoid overflow.

Diffstat:
Msrc/lib9/fmt/fltfmt.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c @@ -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;