From 77e400ebcde847289260797535e5be5fea3f52dd Mon Sep 17 00:00:00 2001 From: John Darrington Date: Tue, 17 May 2005 13:53:38 +0000 Subject: [PATCH] Fixed buffer overflow buglet (test/commands/bignum.sh crashed on gcc-2.95 ) --- src/data-out.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/data-out.c b/src/data-out.c index 5fce84f6..d21d2902 100644 --- a/src/data-out.c +++ b/src/data-out.c @@ -1042,7 +1042,7 @@ try_F (char *dst, const struct fmt_spec *fp, double number) /* There are no decimal places, so there's no way that the value can be shortened. Either it fits or it doesn't. */ - char buf[40]; + char buf[41]; sprintf (buf, "%*.0f", fp->w, number); if (strlen (buf) <= fp->w) { -- 2.30.2