aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwkj <devnull@localhost>2005-11-01 15:27:28 +0000
committerwkj <devnull@localhost>2005-11-01 15:27:28 +0000
commit14367520a219d579ff96ef610cf113859285d324 (patch)
treefa87e4615b4bcee43e63dc7c522f1624ea9a0a04 /src
parent604ad4d8ff971314f37440963f4ad8e6ea79aacc (diff)
downloadplan9port-14367520a219d579ff96ef610cf113859285d324.tar.gz
plan9port-14367520a219d579ff96ef610cf113859285d324.tar.bz2
plan9port-14367520a219d579ff96ef610cf113859285d324.zip
Properly size buffer to avoid overflow.
Diffstat (limited to 'src')
-rw-r--r--src/lib9/fmt/fltfmt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib9/fmt/fltfmt.c b/src/lib9/fmt/fltfmt.c
index 8afd024a..14ad8679 100644
--- 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;