diff options
author | 2017-03-03 13:10:55 +0000 | |
---|---|---|
committer | 2017-03-03 13:10:55 +0000 | |
commit | cca537a6e954e2d1ed4a3b17047c79f99e46ccd0 (patch) | |
tree | 632ec49f00cb666637b6df74f5ca60636de50cc8 | |
parent | Fix previous: do not access the byte before the string if the string (diff) | |
download | wireguard-openbsd-cca537a6e954e2d1ed4a3b17047c79f99e46ccd0.tar.xz wireguard-openbsd-cca537a6e954e2d1ed4a3b17047c79f99e46ccd0.zip |
A missing initialization could randomly cause regular expression
searches to be case-insensitive that ought to be case sensitive.
Found by jsg@ with scan-build.
-rw-r--r-- | usr.bin/mandoc/mansearch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/mandoc/mansearch.c b/usr.bin/mandoc/mansearch.c index 6b02ff5b6d6..571fd8ec04f 100644 --- a/usr.bin/mandoc/mansearch.c +++ b/usr.bin/mandoc/mansearch.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mansearch.c,v 1.51 2016/08/01 10:32:39 schwarze Exp $ */ +/* $OpenBSD: mansearch.c,v 1.52 2017/03/03 13:10:55 schwarze Exp $ */ /* * Copyright (c) 2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015, 2016 Ingo Schwarze <schwarze@openbsd.org> @@ -657,6 +657,7 @@ exprterm(const struct mansearch *search, int argc, char *argv[], int *argi) * If needed, request regular expression handling. */ + cs = 1; if (search->argmode == ARG_WORD) { e->bits = TYPE_Nm; e->match.type = DBM_REGEX; |