summaryrefslogtreecommitdiff
path: root/usr.bin/less/brac.c
diff options
context:
space:
mode:
authorTobias Stoeckmann <tobias@cvs.openbsd.org>2021-10-09 15:27:20 +0000
committerTobias Stoeckmann <tobias@cvs.openbsd.org>2021-10-09 15:27:20 +0000
commitd001a943ebb443c9fda14de8bf29b101ebd2ddff (patch)
tree8415aa91c5c02bc38ddedfc0c984e21667637a6c /usr.bin/less/brac.c
parent17ed06b88d3bbe9dc4af4439d247200c26c33785 (diff)
Merge upstream bug fixes
- Switch http to https for upstream URL - Fix buffer sizes and lesskey parser functions - Fix integer overflow in bracket match function - Fix prompt hiding feature (CTRL + P) ok deraadt, millert
Diffstat (limited to 'usr.bin/less/brac.c')
-rw-r--r--usr.bin/less/brac.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/usr.bin/less/brac.c b/usr.bin/less/brac.c
index b27ea6162f5..0540e41de57 100644
--- a/usr.bin/less/brac.c
+++ b/usr.bin/less/brac.c
@@ -75,6 +75,8 @@ match_brac(int obrac, int cbrac, int forwdir, int n)
nest = 0;
while ((c = (*chget)()) != EOI) {
if (c == obrac) {
+ if (nest == INT_MAX)
+ break;
nest++;
} else if (c == cbrac && --nest < 0) {
/*