summaryrefslogtreecommitdiff
path: root/usr.bin/m4
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2001-10-13 20:18:49 +0000
committerMarc Espie <espie@cvs.openbsd.org>2001-10-13 20:18:49 +0000
commit972b3058828080bb6cfbace0ac08b44f79934b72 (patch)
tree038d254fa43b6e4a8ed71e611686b0af6c4e7785 /usr.bin/m4
parent261a1fde5f755bca57b6115a665f76ad6448d1a1 (diff)
Resize buffer correctly, I'm an idiot.
Found by fries@, ok deraadt@
Diffstat (limited to 'usr.bin/m4')
-rw-r--r--usr.bin/m4/gnum4.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c
index edaca999413..8a6eea343ad 100644
--- a/usr.bin/m4/gnum4.c
+++ b/usr.bin/m4/gnum4.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gnum4.c,v 1.14 2001/09/28 00:46:02 espie Exp $ */
+/* $OpenBSD: gnum4.c,v 1.15 2001/10/13 20:18:48 espie Exp $ */
/*
* Copyright (c) 1999 Marc Espie
@@ -216,7 +216,7 @@ addchars(c, n)
{
if (n == 0)
return;
- if (current + n > bufsize) {
+ while (current + n > bufsize) {
if (bufsize == 0)
bufsize = 1024;
else