svn commit: r330021 - in head/sysutils/grok: . files
Wesley Shields
wxs at FreeBSD.org
Thu Oct 10 17:34:36 UTC 2013
Author: wxs
Date: Thu Oct 10 17:34:34 2013
New Revision: 330021
URL: http://svnweb.freebsd.org/changeset/ports/330021
Log:
Fix an infinite loop in discogrok.
PR: ports/182490
Submitted by: "Regis A. Despres" <regis.despres at gmail.com>
Obtained from: https://github.com/jordansissel/grok/commit/f1858bfa347bc79ad9aa6f3425edd3c19ffecf42
Added:
head/sysutils/grok/files/patch-discover_main.c (contents, props changed)
head/sysutils/grok/files/patch-grok_discover.c (contents, props changed)
Modified:
head/sysutils/grok/Makefile
Modified: head/sysutils/grok/Makefile
==============================================================================
--- head/sysutils/grok/Makefile Thu Oct 10 17:09:33 2013 (r330020)
+++ head/sysutils/grok/Makefile Thu Oct 10 17:34:34 2013 (r330021)
@@ -2,6 +2,7 @@
PORTNAME= grok
PORTVERSION= 1.20110708.1
+PORTREVISION= 1
PORTEPOCH= 1
CATEGORIES= sysutils
MASTER_SITES= GOOGLE_CODE
Added: head/sysutils/grok/files/patch-discover_main.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/grok/files/patch-discover_main.c Thu Oct 10 17:34:34 2013 (r330021)
@@ -0,0 +1,11 @@
+--- ./discover_main.c.orig 2013-10-10 13:25:59.000000000 -0400
++++ ./discover_main.c 2013-10-10 13:26:13.000000000 -0400
+@@ -33,7 +33,7 @@
+ grok_init(&grok);
+
+ int pattern_count = 0;
+- while ((opt = getopt_long_only(argc, argv, "hp:v", options, &optind)) != -1) {
++ while ((opt = getopt_long_only(argc, argv, "hp:v", options, NULL)) != -1) {
+ switch (opt) {
+ case 'h':
+ usage();
Added: head/sysutils/grok/files/patch-grok_discover.c
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/sysutils/grok/files/patch-grok_discover.c Thu Oct 10 17:34:34 2013 (r330021)
@@ -0,0 +1,12 @@
+--- ./grok_discover.c.orig 2013-10-10 13:26:22.000000000 -0400
++++ ./grok_discover.c 2013-10-10 13:27:24.000000000 -0400
+@@ -187,6 +187,9 @@
+ if (first_match_endpos > 0) {
+ offset += first_match_endpos;
+ }
++ else {
++ offset += 1;
++ }
+ } else { /* We found a match, replace it in the pattern */
+ grok_log(gdt, LOG_DISCOVER, "%d: Matched %s on '%.*s'",
+ rounds, best_match.grok->pattern,
More information about the svn-ports-head
mailing list