diff options
author | 2017-09-10 18:16:03 +0000 | |
---|---|---|
committer | 2017-09-10 18:16:03 +0000 | |
commit | 4962375f39c3b98d13f9636eaeeebbe57b1e6067 (patch) | |
tree | 30cb757a3678b16c69b378518734dd7c1aa17142 | |
parent | Fix spelling of 4.3BSD-Net/2. (diff) | |
download | wireguard-openbsd-4962375f39c3b98d13f9636eaeeebbe57b1e6067.tar.xz wireguard-openbsd-4962375f39c3b98d13f9636eaeeebbe57b1e6067.zip |
Backslash escapes the next character in filename patterns.
ok millert@
-rw-r--r-- | bin/pax/pat_rep.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/pax/pat_rep.c b/bin/pax/pat_rep.c index 8b3d9efc2ab..0fbae0d3ccc 100644 --- a/bin/pax/pat_rep.c +++ b/bin/pax/pat_rep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pat_rep.c,v 1.41 2016/08/26 04:19:28 guenther Exp $ */ +/* $OpenBSD: pat_rep.c,v 1.42 2017/09/10 18:16:03 guenther Exp $ */ /* $NetBSD: pat_rep.c,v 1.4 1995/03/21 09:07:33 cgd Exp $ */ /*- @@ -553,6 +553,9 @@ fn_match(char *pattern, char *string, char **pend) return (-1); break; case '\\': + if ((c = *pattern++) == '\0') + return (-1); + /* FALLTHROUGH */ default: if (c != *string++) return (-1); |