]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/bregex.c
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / lib / bregex.c
index b6ef5d6f36ad29b51ff92757eb1a9bc1273ad6e2..994b0153bdf1602f18c2265911f074392e701665 100644 (file)
@@ -16,7 +16,6 @@
  *
  * This code draws many ideas from the regular expression packages by
  * Henry Spencer of the University of Toronto and Richard Stallman of
- * the Free Software Foundation.
  *
  * Emacs-specific code and syntax table code is almost directly borrowed
  * from GNU regexp.
  *    Eric Bollengier April 2007
  */
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
-   Copyright (C) 2006-2014 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2016 Kern Sibbald
 
-   The main author of Bacula is Kern Sibbald, with contributions from many
-   others, a complete list can be found in the file AUTHORS.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 
 
@@ -1488,7 +1490,7 @@ int regexec(regex_t * preg, const char *string, size_t nmatch,
    int len = strlen(string);
    struct re_registers regs;
    stat = re_search(preg, (unsigned char *)string, len, 0, len, &regs);
-   if (stat >= 0) {
+   if (stat >= 0 && nmatch > 0) {
       re_registers_to_regmatch(&regs, pmatch, nmatch);
    }
    /* stat is the start position in the string base 0 where