summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2016-01-07 20:19:01 +0000
committerIngo Schwarze <schwarze@openbsd.org>2016-01-07 20:19:01 +0000
commit2a0a5838c9334e2e30548b44810b594c9cdbe106 (patch)
tree1b66b9982985cf02a85b1d8e4fb4b910870d00eb
parent73313aef144893f62465ca04474ae0a5ab8f8b68 (diff)
downloadmandoc-2a0a5838c9334e2e30548b44810b594c9cdbe106.tar.gz
Recursive "define" was not detected because "lim" was never
incremented, causing infinite loops. Fixing CID 1288962. From christos@ via wiz@, both at NetBSD.
-rw-r--r--eqn.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/eqn.c b/eqn.c
index 1458d791..b84ce7e5 100644
--- a/eqn.c
+++ b/eqn.c
@@ -448,6 +448,7 @@ again:
memmove(start + *sz + diff, start + *sz,
(strlen(start) - *sz) + 1);
memcpy(start, def->val, def->valsz);
+ lim++;
goto again;
}