projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
397e4b9
)
Fixed buffer overflow buglet (test/commands/bignum.sh crashed on gcc-2.95 )
author
John Darrington
<john@darrington.wattle.id.au>
Tue, 17 May 2005 13:53:38 +0000
(13:53 +0000)
committer
John Darrington
<john@darrington.wattle.id.au>
Tue, 17 May 2005 13:53:38 +0000
(13:53 +0000)
src/data-out.c
patch
|
blob
|
history
diff --git
a/src/data-out.c
b/src/data-out.c
index 5fce84f6c433b1075db40d5af774ec98eaedfca0..d21d2902e1e5fcfe383b0872c1dabed27ef75c88 100644
(file)
--- 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[4
0
];
+ char buf[4
1
];
sprintf (buf, "%*.0f", fp->w, number);
if (strlen (buf) <= fp->w)
{