From ceecf5ff434af5940a3eebfe1f82847893f5b9e5 Mon Sep 17 00:00:00 2001 From: Jean-Francois Dockes Date: Mon, 12 Oct 2020 20:18:32 +0200 Subject: [PATCH] debian package: add rclconfig patch --- packaging/debian/debian/changelog | 2 +- ...onfig-avoid-post-increment-before-end.diff | 26 +++++++++++++++++++ packaging/debian/debian/patches/series | 1 + 3 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 packaging/debian/debian/patches/rclconfig-avoid-post-increment-before-end.diff diff --git a/packaging/debian/debian/changelog b/packaging/debian/debian/changelog index 461bde6c..2c44c0e7 100644 --- a/packaging/debian/debian/changelog +++ b/packaging/debian/debian/changelog @@ -1,4 +1,4 @@ -recoll (1.27.9-1~ppaPPAVERS~SERIES1) SERIES; urgency=low +recoll (1.27.9-2~ppaPPAVERS~SERIES1) SERIES; urgency=low * Fix bug in result table display. diff --git a/packaging/debian/debian/patches/rclconfig-avoid-post-increment-before-end.diff b/packaging/debian/debian/patches/rclconfig-avoid-post-increment-before-end.diff new file mode 100644 index 00000000..7a2fcde4 --- /dev/null +++ b/packaging/debian/debian/patches/rclconfig-avoid-post-increment-before-end.diff @@ -0,0 +1,26 @@ +diff --git a/common/rclconfig.cpp b/common/rclconfig.cpp +index 1d5afba5d..dbbdcb256 100644 +--- a/common/rclconfig.cpp ++++ b/common/rclconfig.cpp +@@ -1689,13 +1689,20 @@ bool RclConfig::processFilterCmd(std::vector& cmd) const + bool hasinterp = !stringlowercmp("python", *it) || + !stringlowercmp("perl", *it); + +- *it++ = findFilter(*it); ++ // Note that, if the cmd vector size is 1, post-incrementing the ++ // iterator in the following statement, which works on x86, leads ++ // to a crash on ARM with gcc 6 and 8 (at least), which does not ++ // seem right (it should just become cmd.end() ?) but ++ // whatever... We do it later then. ++ *it = findFilter(*it); ++ + if (hasinterp) { + if (cmd.size() < 2) { + LOGERR("processFilterCmd: python/perl cmd: no script?. [" << + stringsToString(cmd) << "]\n"); + return false; + } else { ++ ++it; + *it = findFilter(*it); + } + } diff --git a/packaging/debian/debian/patches/series b/packaging/debian/debian/patches/series index e69de29b..905b0b1b 100644 --- a/packaging/debian/debian/patches/series +++ b/packaging/debian/debian/patches/series @@ -0,0 +1 @@ +rclconfig-avoid-post-increment-before-end.diff