aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorSteve Price <steve@FreeBSD.org>1997-02-16 01:54:19 +0000
committerSteve Price <steve@FreeBSD.org>1997-02-16 01:54:19 +0000
commit2293cbb28ac25324c80a1ca1f35bbc85547a147e (patch)
treeaf1620df30ae8499197013cc47a71eb2d41f7a3b /bin
parent8f2a742859317447b1b2dd3c7411fb0fcdb7cc94 (diff)
Notes
Diffstat (limited to 'bin')
-rw-r--r--bin/sh/expand.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bin/sh/expand.c b/bin/sh/expand.c
index 15fd18292384..0efed2e4c8c9 100644
--- a/bin/sh/expand.c
+++ b/bin/sh/expand.c
@@ -335,7 +335,10 @@ expari(flag)
* have to rescan starting from the beginning since CTLESC
* characters have to be processed left to right.
*/
- CHECKSTRSPACE(8, expdest);
+#if INT_MAX / 1000000000 >= 10 || INT_MIN / 1000000000 <= -10
+#error "integers with more than 10 digits are not supported"
+#endif
+ CHECKSTRSPACE(12 - 2, expdest);
USTPUTC('\0', expdest);
start = stackblock();
p = expdest;
@@ -350,7 +353,7 @@ expari(flag)
if (quotes)
rmescapes(p+1);
result = arith(p+1);
- fmtstr(p, 10, "%d", result);
+ fmtstr(p, 12, "%d", result);
while (*p++)
;
result = expdest - p + 1;