diff options
author | 2019-01-15 09:24:59 +0000 | |
---|---|---|
committer | 2019-01-15 09:24:59 +0000 | |
commit | bb180e11c8986de5b312f1987cbcd1fe89017ab5 (patch) | |
tree | 2f763a3350dfa3fe258926e7aa6a9eabbe8a2340 | |
parent | Swap 'token' and 'id' place in filter protocol. (diff) | |
download | wireguard-openbsd-bb180e11c8986de5b312f1987cbcd1fe89017ab5.tar.xz wireguard-openbsd-bb180e11c8986de5b312f1987cbcd1fe89017ab5.zip |
Regex flags should include REG_NEWLINE and REG_ICASE should actually be
used if specified.
-rw-r--r-- | usr.bin/file/magic-test.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/file/magic-test.c b/usr.bin/file/magic-test.c index 037d3d19581..59bb960a25e 100644 --- a/usr.bin/file/magic-test.c +++ b/usr.bin/file/magic-test.c @@ -1,4 +1,4 @@ -/* $OpenBSD: magic-test.c,v 1.26 2018/06/14 19:51:11 nicm Exp $ */ +/* $OpenBSD: magic-test.c,v 1.27 2019/01/15 09:24:59 nicm Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -1016,7 +1016,7 @@ magic_test_type_regex(struct magic_line *ml, struct magic_state *ms) } } - if (regcomp(&re, ml->test_string, REG_EXTENDED) != 0) + if (regcomp(&re, ml->test_string, REG_EXTENDED|REG_NEWLINE|flags) != 0) return (-1); m.rm_so = ms->offset; m.rm_eo = ms->size; |