diff options
author | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-10 18:16:04 +0000 |
---|---|---|
committer | Philip Guenther <guenther@cvs.openbsd.org> | 2017-09-10 18:16:04 +0000 |
commit | 532130f42f37d01921a4d61e86ecd74efd2fcc0d (patch) | |
tree | a8b4cf7857a0cb3b6931d146caa836168d5e1882 /bin/pax/pat_rep.c | |
parent | 8e2547ba430967d98ef5b78a8fa3c27b1df9cff0 (diff) |
Backslash escapes the next character in filename patterns.
ok millert@
Diffstat (limited to 'bin/pax/pat_rep.c')
-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); |