Hello community,

here is the log from the commit of package logwarn for openSUSE:Factory checked 
in at 2016-06-26 23:52:27
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/logwarn (Old)
 and      /work/SRC/openSUSE:Factory/.logwarn.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "logwarn"

Changes:
--------
--- /work/SRC/openSUSE:Factory/logwarn/logwarn.changes  2016-06-20 
11:07:44.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.logwarn.new/logwarn.changes     2016-06-26 
23:52:29.000000000 +0200
@@ -1,0 +2,16 @@
+Fri Jun 24 14:27:12 UTC 2016 - [email protected]
+
+- Upgrade to release 1.0.14
+  + Fix bug where `-T' suppressed everything when used with `-p'
+  + Fix bug where `-T' would also count negative patterns
+  + Fix segfault parsing `-T' in certain cases
+
+-------------------------------------------------------------------
+Mon Jun 20 20:54:04 UTC 2016 - [email protected]
+
+- Add 7eac274.patch
+  + Fixes bug where `-T' would also count negative patterns
+- Add 3a874b0.patch
+  + Fixes bug where `-T' suppressed everything when used with `-p'
+
+-------------------------------------------------------------------

Old:
----
  logwarn-1.0.13.tar.gz

New:
----
  logwarn-1.0.14.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ logwarn.spec ++++++
--- /var/tmp/diff_new_pack.FZARV1/_old  2016-06-26 23:52:30.000000000 +0200
+++ /var/tmp/diff_new_pack.FZARV1/_new  2016-06-26 23:52:30.000000000 +0200
@@ -18,7 +18,7 @@
 
 
 Name:           logwarn
-Version:        1.0.13
+Version:        1.0.14
 Release:        0
 Summary:        Utility for finding interesting messages in log files
 License:        Apache-2.0

++++++ logwarn-1.0.13.tar.gz -> logwarn-1.0.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logwarn-1.0.13/CHANGES new/logwarn-1.0.14/CHANGES
--- old/logwarn-1.0.13/CHANGES  2016-06-19 23:16:59.000000000 +0200
+++ new/logwarn-1.0.14/CHANGES  2016-06-24 16:23:10.000000000 +0200
@@ -1,4 +1,10 @@
 
+Version 1.0.14 Released June 24, 2016
+
+    - Fix bug where `-T' suppressed everything when used with `-p'
+    - Fix bug where `-T' would also count negative patterns
+    - Fix segfault parsing `-T' in certain cases
+
 Version 1.0.13 Released June 19, 2016
 
     - Added `-T num/secs' for frequency filtering
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logwarn-1.0.13/configure new/logwarn-1.0.14/configure
--- old/logwarn-1.0.13/configure        2016-06-19 23:20:32.000000000 +0200
+++ new/logwarn-1.0.14/configure        2016-06-24 16:24:23.000000000 +0200
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for logwarn Utility for finding interesting 
messages in log files 1.0.13.
+# Generated by GNU Autoconf 2.69 for logwarn Utility for finding interesting 
messages in log files 1.0.14.
 #
 # Report bugs to <https://github.com/archiecobbs/logwarn/>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='logwarn Utility for finding interesting messages in log files'
 PACKAGE_TARNAME='logwarn'
-PACKAGE_VERSION='1.0.13'
-PACKAGE_STRING='logwarn Utility for finding interesting messages in log files 
1.0.13'
+PACKAGE_VERSION='1.0.14'
+PACKAGE_STRING='logwarn Utility for finding interesting messages in log files 
1.0.14'
 PACKAGE_BUGREPORT='https://github.com/archiecobbs/logwarn/'
 PACKAGE_URL=''
 
@@ -1274,7 +1274,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures logwarn Utility for finding interesting messages in 
log files 1.0.13 to adapt to many kinds of systems.
+\`configure' configures logwarn Utility for finding interesting messages in 
log files 1.0.14 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1340,7 +1340,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of logwarn Utility for finding 
interesting messages in log files 1.0.13:";;
+     short | recursive ) echo "Configuration of logwarn Utility for finding 
interesting messages in log files 1.0.14:";;
    esac
   cat <<\_ACEOF
 
@@ -1437,7 +1437,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-logwarn Utility for finding interesting messages in log files configure 1.0.13
+logwarn Utility for finding interesting messages in log files configure 1.0.14
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1693,7 +1693,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by logwarn Utility for finding interesting messages in log 
files $as_me 1.0.13, which was
+It was created by logwarn Utility for finding interesting messages in log 
files $as_me 1.0.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2556,7 +2556,7 @@
 
 # Define the identity of the package.
  PACKAGE='logwarn'
- VERSION='1.0.13'
+ VERSION='1.0.14'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4838,7 +4838,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by logwarn Utility for finding interesting messages in 
log files $as_me 1.0.13, which was
+This file was extended by logwarn Utility for finding interesting messages in 
log files $as_me 1.0.14, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -4904,7 +4904,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-logwarn Utility for finding interesting messages in log files config.status 
1.0.13
+logwarn Utility for finding interesting messages in log files config.status 
1.0.14
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logwarn-1.0.13/configure.ac 
new/logwarn-1.0.14/configure.ac
--- old/logwarn-1.0.13/configure.ac     2016-06-19 23:19:48.000000000 +0200
+++ new/logwarn-1.0.14/configure.ac     2016-06-20 00:43:53.000000000 +0200
@@ -16,7 +16,7 @@
 # limitations under the License.
 #
 
-AC_INIT([logwarn Utility for finding interesting messages in log files], 
[1.0.13], [https://github.com/archiecobbs/logwarn/], [logwarn])
+AC_INIT([logwarn Utility for finding interesting messages in log files], 
[1.0.14], [https://github.com/archiecobbs/logwarn/], [logwarn])
 AC_CONFIG_AUX_DIR(scripts)
 AM_INIT_AUTOMAKE
 dnl AM_MAINTAINER_MODE
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logwarn-1.0.13/gitrev.c new/logwarn-1.0.14/gitrev.c
--- old/logwarn-1.0.13/gitrev.c 2016-06-19 23:20:36.000000000 +0200
+++ new/logwarn-1.0.14/gitrev.c 2016-06-24 16:24:35.000000000 +0200
@@ -1 +1 @@
-const char *const logwarn_version = "1.0.13";
+const char *const logwarn_version = "1.0.14";
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/logwarn-1.0.13/main.c new/logwarn-1.0.14/main.c
--- old/logwarn-1.0.13/main.c   2016-06-19 22:37:01.000000000 +0200
+++ new/logwarn-1.0.14/main.c   2016-06-24 16:22:11.000000000 +0200
@@ -187,69 +187,77 @@
         usage();
         exit(EXIT_ERROR);
     default:
+
+        // Get log file
         logfile = argv[0];
         if (strcmp(logfile, "-") == 0)
             logfile = NULL;
         argv++;
         argc--;
-        num_match_patterns = argc;
-        if (initialize && num_match_patterns > 0) {
-            usage();
-            exit(EXIT_ERROR);
-        }
-        if (num_match_patterns > 0) {
-            if ((match_patterns = malloc(num_match_patterns * 
sizeof(*match_patterns))) == NULL
-              || (state.repeats = malloc(num_match_patterns * 
sizeof(*state.repeats))) == NULL) {
-                fprintf(stderr, "%s: %s: %s\n", PACKAGE, "malloc", 
strerror(errno));
+
+        // If initializing, no patterns should be given
+        if (initialize) {
+            if (argc > 0) {
+                usage();
                 exit(EXIT_ERROR);
             }
-            memset(match_patterns, 0, num_match_patterns * 
sizeof(*match_patterns));
-            memset(state.repeats, 0, num_match_patterns * 
sizeof(*state.repeats));
-            for (i = 0; i < num_match_patterns; i++) {
-                struct repat *const pat = &match_patterns[i];
-                char *patstr = argv[i];
+            break;
+        }
 
-                // Add new repeat?
-                if (strcmp(patstr, "-T") == 0) {
-                    struct repeat *const repeat = 
&state.repeats[state.num_repeats++];
+        // Allocate pattern array
+        if ((match_patterns = malloc(argc * sizeof(*match_patterns))) == NULL
+          || (state.repeats = malloc(argc * sizeof(*state.repeats))) == NULL) {
+            fprintf(stderr, "%s: %s: %s\n", PACKAGE, "malloc", 
strerror(errno));
+            exit(EXIT_ERROR);
+        }
+        memset(match_patterns, 0, argc * sizeof(*match_patterns));
+        memset(state.repeats, 0, argc * sizeof(*state.repeats));
 
-                    if (i > num_match_patterns - 3 || sscanf(argv[++i], 
"%u/%u", &repeat->num, &repeat->secs) != 2) {
-                        usage();
-                        exit(EXIT_ERROR);
-                    }
-                    if (repeat->num == 0) {
-                        fprintf(stderr, "%s: invalid zero repeat count in \"-T 
%s\"", PACKAGE, argv[i]);
-                        exit(EXIT_ERROR);
-                    }
-                    if ((repeat->occurrences = malloc(repeat->num * 
sizeof(repeat->occurrences))) == NULL) {
-                        fprintf(stderr, "%s: %s: %s\n", PACKAGE, "malloc", 
strerror(errno));
-                        exit(EXIT_ERROR);
-                    }
-                    memset(repeat->occurrences, 0, repeat->num * 
sizeof(*repeat->occurrences));
-                    patstr = argv[++i];
-                }
+        // Parse patterns and `-T' flags
+        for (i = 0; i < argc; i++) {
+            struct repat *const pat = &match_patterns[num_match_patterns++];
+            char *patstr = argv[i];
+
+            // Add new repeat?
+            if (strcmp(patstr, "-T") == 0) {
+                struct repeat *const repeat = 
&state.repeats[state.num_repeats++];
 
-                // Check for negation
-                if (*patstr == '!') {
-                    patstr++;
-                    pat->negate = 1;
+                if (i > argc - 3 || sscanf(argv[++i], "%u/%u", &repeat->num, 
&repeat->secs) != 2) {
+                    usage();
+                    exit(EXIT_ERROR);
                 }
-
-                // Add (positive) pattern to the current repeat, if any
-                if (*patstr != '!' && state.num_repeats > 0) {
-                    struct repeat *const current_repeat = 
&state.repeats[state.num_repeats - 1];
-                    unsigned int hash = 0;
-                    const char *s;
-
-                    for (s = patstr; *s != '\0'; s++)
-                        hash = hash * 37 + (unsigned char)*s;
-                    current_repeat->hash ^= hash;
-                    pat->repeat = current_repeat;
+                if (repeat->num == 0) {
+                    fprintf(stderr, "%s: invalid zero repeat count in \"-T 
%s\"", PACKAGE, argv[i]);
+                    exit(EXIT_ERROR);
                 }
+                if ((repeat->occurrences = malloc(repeat->num * 
sizeof(repeat->occurrences))) == NULL) {
+                    fprintf(stderr, "%s: %s: %s\n", PACKAGE, "malloc", 
strerror(errno));
+                    exit(EXIT_ERROR);
+                }
+                memset(repeat->occurrences, 0, repeat->num * 
sizeof(*repeat->occurrences));
+                patstr = argv[++i];
+            }
+
+            // Check for negation
+            if (*patstr == '!') {
+                patstr++;
+                pat->negate = 1;
+            }
 
-                // Parse pattern
-                parse_pattern(pat, patstr, eflags);
+            // Add (positive) pattern to the current repeat, if any
+            if (!pat->negate && state.num_repeats > 0) {
+                struct repeat *const current_repeat = 
&state.repeats[state.num_repeats - 1];
+                unsigned int hash = 0;
+                const char *s;
+
+                for (s = patstr; *s != '\0'; s++)
+                    hash = hash * 37 + (unsigned char)*s;
+                current_repeat->hash ^= hash;
+                pat->repeat = current_repeat;
             }
+
+            // Parse pattern
+            parse_pattern(pat, patstr, eflags);
         }
         break;
     }
@@ -542,7 +550,6 @@
 
                         // If so, reset occurrence history for this pattern 
group
                         memset(repeat->occurrences, 0, repeat->num * 
sizeof(*repeat->occurrences));
-                        break;
                     }
 
                     // No repeat suppression


Reply via email to