Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Process patterns containing $ end ^ (but not as last or first char)

using regcomp() instead of fastcomp(). ok millert@
  • Loading branch information...
commit 8e467165ff9542c7ef9e289b558e43069f0d8391 1 parent 69dbfbb
Otto Moerbeek authored committed
Showing with 1 addition and 2 deletions.
  1. +1 −2  util.c
View
3  util.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: util.c,v 1.34 2006/12/26 20:59:23 otto Exp $ */
+/* $OpenBSD: util.c,v 1.35 2007/09/02 15:19:32 deraadt Exp $ */
/*-
* Copyright (c) 1999 James Howard and Dag-Erling Coïdan Smørgrav
@@ -327,7 +327,6 @@ fastcomp(fastgrep_t *fg, const char *pattern)
/* Can still cheat? */
if ((isalnum(fg->pattern[i])) || isspace(fg->pattern[i]) ||
(fg->pattern[i] == '_') || (fg->pattern[i] == ',') ||
- (fg->pattern[i] == '^') || (fg->pattern[i] == '$') ||
(fg->pattern[i] == '=') || (fg->pattern[i] == '-') ||
(fg->pattern[i] == ':') || (fg->pattern[i] == '/')) {
/* As long as it is good, upper case it for later. */
Please sign in to comment.
Something went wrong with that request. Please try again.