From 87e7fe4e1043fcc898ad08a478c4d02814d5a347 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Sat, 31 Mar 2007 21:03:45 +0000 Subject: [PATCH] ebl fix regexp separator git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@4479 91ce42f0-d328-0410-95d8-f526ca767f89 --- bacula/patches/testing/breg.c | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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; -- 2.39.5