git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4479
91ce42f0-d328-0410-95d8-
f526ca767f89
bool BREGEXP::extract_regexp(const char *motif)
{
- if (!motif || (*motif == '\0')) {
+ if ( !motif ) {
return false;
}
+
char sep = motif[0];
+
+ if (!(sep == '!' ||
+ sep == ':' ||
+ sep == ';' ||
+ sep == 'ยง' ||
+ sep == ',' ||
+ sep == '&' ||
+ sep == '%' ||
+ sep == '=' ||
+ sep == '~' ||
+ sep == '#' ))
+ {
+ return false;
+ }
+
char *search = (char *) motif + 1;
char *replace;
int options = REG_EXTENDED | REG_NEWLINE;