OSSP CVS Repository

ossp - Check-in [2475]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 2475
Date: 2002-Aug-02 12:56:21 (local)
2002-Aug-02 10:56:21 (UTC)
User:rse
Branch:
Comment: Compile regular expressions with PCRE_ANCHORED to make sure they are anchored. This means the ident "bar/.*" does not match "foobar/quux". If it should it now has to be written ".*bar/quux".
Tickets:
Inspections:
Files:
ossp-pkg/fsl/ChangeLog      1.2 -> 1.3     8 inserted, 1 deleted
ossp-pkg/fsl/fsl.c      1.46 -> 1.47     1 inserted, 1 deleted

ossp-pkg/fsl/ChangeLog 1.2 -> 1.3

--- ChangeLog    2002/08/01 10:18:06     1.2
+++ ChangeLog    2002/08/02 10:56:21     1.3
@@ -9,7 +9,14 @@
   ChangeLog
   =========
 
-  Changes between 0.1.* and 1.0.0 (09-Jul-2002 to 01-Aug-2002)
+  Changes between 1.0.0 and 1.0.1 (01-Aug-2002 to xx-Aug-2002)
+
+    *) Compile regular expressions with PCRE_ANCHORED to make sure
+       they are anchored. This means the ident "bar/.*" does not match
+       "foobar/quux". If it should it now has to be written ".*bar/quux".
+       [Ralf S. Engelschall <rse@engelschall.com>]
+
+  Changes between *GENESIS* and 1.0.0 (09-Jul-2002 to 01-Aug-2002)
 
     *) Switched to OSSP l2 for message logging
     *) Switched to OSSP cfg and OSSP pcre for configuration parsing


ossp-pkg/fsl/fsl.c 1.46 -> 1.47

--- fsl.c        2002/08/01 15:27:01     1.46
+++ fsl.c        2002/08/02 10:56:22     1.47
@@ -526,7 +526,7 @@
                 fsldebug(L2_LEVEL_DEBUG, "processcfg: argident=%s, argmatch=%s, argl2spec=%s", argident, argmatch, argl2spec);
 
                 /* compile regular expression into finite state machine and optimize */
-                if ((pcreRegex = pcre_compile(argmatch, PCRE_CASELESS, &cpError, &iError, NULL)) == NULL) {
+                if ((pcreRegex = pcre_compile(argmatch, PCRE_ANCHORED|PCRE_CASELESS, &cpError, &iError, NULL)) == NULL) {
                     fsldebug(L2_LEVEL_ERROR, "processcfg: pcre_compile() failed with error %s (%d)", cpError, iError); CU(FSL_ERR_CUS); }
                 pcreExtra = pcre_study(pcreRegex, 0, &cpError);
                 if (cpError != NULL) {

CVSTrac 2.0.1