diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-07 20:18:35 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2016-01-07 20:18:35 +0000 |
commit | af9b9a58897bd4d744ef997d27aabae468075ee6 (patch) | |
tree | bb375933bb9a41cbc3494a0a24cf786ab889e8de /usr.bin | |
parent | f02bcea80352ba6868b6735055c772c9773ba9f7 (diff) |
Recursive "define" was not detected because "lim" was never
incremented, causing infinite loops.
Fixing CID 1288962. From christos@ via wiz@, both at NetBSD.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/eqn.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/eqn.c b/usr.bin/mandoc/eqn.c index fc521c890a6..c9decf5fec2 100644 --- a/usr.bin/mandoc/eqn.c +++ b/usr.bin/mandoc/eqn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eqn.c,v 1.22 2015/10/06 18:30:43 schwarze Exp $ */ +/* $OpenBSD: eqn.c,v 1.23 2016/01/07 20:18:34 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -446,6 +446,7 @@ again: memmove(start + *sz + diff, start + *sz, (strlen(start) - *sz) + 1); memcpy(start, def->val, def->valsz); + lim++; goto again; } |