Followup-For: Bug #875422 Fixed in stretch with the the attached patch.
Andreas
diff -Nru grok-1.20110708.1/debian/changelog grok-1.20110708.1/debian/changelog --- grok-1.20110708.1/debian/changelog 2015-01-16 23:03:19.000000000 +0100 +++ grok-1.20110708.1/debian/changelog 2017-11-27 17:12:13.000000000 +0100 @@ -1,3 +1,29 @@ +grok (1.20110708.1-4.3~deb9u1) stretch; urgency=medium + + * Non-maintainer upload. + * Rebuild for stretch. + * Drop the gperf 3.1 patches + + -- Andreas Beckmann <a...@debian.org> Mon, 27 Nov 2017 17:12:13 +0100 + +grok (1.20110708.1-4.3) unstable; urgency=medium + + * Non-maintainer upload. + * libgrok-dev: Add the missing dependencies on: + - libgrok1 (Closes: #875422) + - libtokyocabinet-dev (Closes: #779034) + + -- Adrian Bunk <b...@debian.org> Sat, 14 Oct 2017 17:15:19 +0300 + +grok (1.20110708.1-4.2) unstable; urgency=medium + + * Non-maintainer upload. + * Apply Steve Langasek's fix for wrong pointer alias bug + (Closes: #841668) + * Apply patches to allow build grok with gperf >= 3.1 + + -- SZALAY Attila <s...@debian.org> Wed, 09 Aug 2017 16:36:26 -0400 + grok (1.20110708.1-4.1) unstable; urgency=medium * Non-maintainer upload. diff -Nru grok-1.20110708.1/debian/control grok-1.20110708.1/debian/control --- grok-1.20110708.1/debian/control 2012-10-14 11:08:33.000000000 +0200 +++ grok-1.20110708.1/debian/control 2017-10-14 16:15:19.000000000 +0200 @@ -52,6 +52,8 @@ Section: libdevel Architecture: any Depends: + libgrok1 (= ${binary:Version}), + libtokyocabinet-dev, ${misc:Depends}, ${shlibs:Depends}, Provides: libgrok-dev diff -Nru grok-1.20110708.1/debian/patches/fix-wrong-pointer-alias grok-1.20110708.1/debian/patches/fix-wrong-pointer-alias --- grok-1.20110708.1/debian/patches/fix-wrong-pointer-alias 1970-01-01 01:00:00.000000000 +0100 +++ grok-1.20110708.1/debian/patches/fix-wrong-pointer-alias 2017-08-09 21:27:57.000000000 +0200 @@ -0,0 +1,55 @@ +From: Steve Langasek <steve.langa...@ubuntu.com> +Date: Fri, 21 Oct 2016 00:00:00 +0000 +X-Dgit-Generated: 1.20110708.1-4.1 7fc1ec5f57e2299be6b1248db82da42f569c6ab0 +Subject: fix wrong pointer alias + + +--- + +--- grok-1.20110708.1.orig/grok_pattern.c ++++ grok-1.20110708.1/grok_pattern.c +@@ -33,9 +33,9 @@ int grok_pattern_add(const grok_t *grok, + } + + int grok_pattern_find(const grok_t *grok, const char *name, size_t name_len, +- const char **regexp, size_t *regexp_len) { ++ const char **regexp, int *regexp_len) { + TCTREE *patterns = grok->patterns; +- *regexp = tctreeget(patterns, name, name_len, (int*) regexp_len); ++ *regexp = tctreeget(patterns, name, name_len, regexp_len); + + grok_log(grok, LOG_PATTERNS, "Searching for pattern '%s' (%s): %.*s", + name, *regexp == NULL ? "not found" : "found", *regexp_len, *regexp); +--- grok-1.20110708.1.orig/grok_pattern.h ++++ grok-1.20110708.1/grok_pattern.h +@@ -9,7 +9,7 @@ TCLIST *grok_pattern_name_list(const gro + int grok_pattern_add(const grok_t *grok, const char *name, size_t name_len, + const char *regexp, size_t regexp_len); + int grok_pattern_find(const grok_t *grok, const char *name, size_t name_len, +- const char **regexp, size_t *regexp_len); ++ const char **regexp, int *regexp_len); + int grok_patterns_import_from_file(const grok_t *grok, const char *filename); + int grok_patterns_import_from_string(const grok_t *grok, const char *buffer); + +--- grok-1.20110708.1.orig/grokre.c ++++ grok-1.20110708.1/grokre.c +@@ -183,7 +183,7 @@ static char *grok_pattern_expand(grok_t + int start, end, matchlen; + const char *pattern_regex; + int patname_len; +- size_t regexp_len; ++ int regexp_len; + int pattern_regex_needs_free = 0; + + grok_log(grok, LOG_REGEXPAND, "% 20s: %.*s", "start of loop", +--- grok-1.20110708.1.orig/test/grok_pattern.test.c ++++ grok-1.20110708.1/test/grok_pattern.test.c +@@ -4,7 +4,7 @@ + void test_grok_pattern_add_and_find_work(void) { + INIT; + const char *regexp = NULL; +- size_t len = 0; ++ int len = 0; + + grok_pattern_add(&grok, "WORD", 5, "\\w+", 3); + grok_pattern_add(&grok, "TEST", 5, "TEST", 4); diff -Nru grok-1.20110708.1/debian/patches/series grok-1.20110708.1/debian/patches/series --- grok-1.20110708.1/debian/patches/series 2015-01-16 23:04:43.000000000 +0100 +++ grok-1.20110708.1/debian/patches/series 2017-11-27 17:12:13.000000000 +0100 @@ -2,3 +2,4 @@ 0001-Support-GNU-kFreeBSD-add-necessary-linker-flag.patch 0002-Support-GNU-Hurd-add-necessary-linker-flag.patch pcre-group-name.patch +fix-wrong-pointer-alias