projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Fixed buffer overflow buglet (test/commands/bignum.sh crashed on gcc-2.95 )
[pspp-builds.git]
/
src
/
data-out.c
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)
{