From owner-svn-ports-head@FreeBSD.ORG Thu Oct 10 17:34:36 2013 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 38A51F8A; Thu, 10 Oct 2013 17:34:36 +0000 (UTC) (envelope-from wxs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 0A7CD2DF6; Thu, 10 Oct 2013 17:34:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r9AHYZ38061660; Thu, 10 Oct 2013 17:34:35 GMT (envelope-from wxs@svn.freebsd.org) Received: (from wxs@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r9AHYZof061654; Thu, 10 Oct 2013 17:34:35 GMT (envelope-from wxs@svn.freebsd.org) Message-Id: <201310101734.r9AHYZof061654@svn.freebsd.org> From: Wesley Shields Date: Thu, 10 Oct 2013 17:34:35 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r330021 - in head/sysutils/grok: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Oct 2013 17:34:36 -0000 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" 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,