From: Eric Bollengier Date: Sat, 31 Mar 2007 21:03:45 +0000 (+0000) Subject: ebl fix regexp separator X-Git-Tag: Release-7.0.0~6646 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=87e7fe4e1043fcc898ad08a478c4d02814d5a347;p=bacula%2Fbacula ebl fix regexp separator git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4479 91ce42f0-d328-0410-95d8-f526ca767f89 --- diff --git a/bacula/patches/testing/breg.c b/bacula/patches/testing/breg.c index 7dc2df94dc..a9a948c5dc 100644 --- a/bacula/patches/testing/breg.c +++ b/bacula/patches/testing/breg.c @@ -135,10 +135,26 @@ alist *get_bregexps(const char *where) 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;