[Freeswitch-svn] [commit] r6255 - freeswitch/trunk/src

Freeswitch SVN anthm at freeswitch.org
Wed Nov 14 10:16:04 EST 2007


Author: anthm
Date: Wed Nov 14 10:16:03 2007
New Revision: 6255

Modified:
   freeswitch/trunk/src/switch_regex.c

Log:
update

Modified: freeswitch/trunk/src/switch_regex.c
==============================================================================
--- freeswitch/trunk/src/switch_regex.c	(original)
+++ freeswitch/trunk/src/switch_regex.c	Wed Nov 14 10:16:03 2007
@@ -68,12 +68,14 @@
 		return 0;
 	}
 
-	if (*expression == '/' && *(expression + (strlen(expression) - 1)) == '/') {
+	if (*expression == '/') {
 		char *opts = NULL;
 		tmp = strdup(expression + 1);
 		assert(tmp);
 		if ((opts = strrchr(tmp, '/'))) {
 			*opts++ = '\0';
+		} else {
+			goto end;
 		}
 		expression = tmp;
 		if (opts) {
@@ -86,6 +88,7 @@
 		}
 	}
 
+
 	re = pcre_compile(expression,	/* the pattern */
 					  flags,		/* default options */
 					  &error,	/* for error message */



More information about the Freeswitch-svn mailing list