diff --git a/0001-lib-Reset-errno-to-zero-to-avoid-erroneously-returni.patch b/0001-lib-Reset-errno-to-zero-to-avoid-erroneously-returni.patch new file mode 100644 index 0000000..4686d56 --- /dev/null +++ b/0001-lib-Reset-errno-to-zero-to-avoid-erroneously-returni.patch @@ -0,0 +1,26 @@ +From ea732cfc0b8a6966fc4c4a60a6a09f45e8a63d71 Mon Sep 17 00:00:00 2001 +From: Michael Meyer +Date: Tue, 22 Jan 2019 16:43:31 -0500 +Subject: [PATCH] lib: Reset errno to zero to avoid erroneously returning E2BIG + +This line was accidentally removed in 77fe74fc, causing +bug #1145056 (Bugzilla) to resurface. +--- + lib/utf16.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/lib/utf16.c b/lib/utf16.c +index e099548..67fa996 100644 +--- a/lib/utf16.c ++++ b/lib/utf16.c +@@ -58,6 +58,7 @@ _hivex_recode (hive_h *h, recode_type t, + /* Reset errno here because we don't want to accidentally + * return E2BIG to a library caller. + */ ++ errno = 0; + size_t prev = outalloc; + /* Try again with a larger output buffer. */ + free (out); +-- +2.20.1 + diff --git a/hivex.spec b/hivex.spec index e034ca2..b01aaeb 100644 --- a/hivex.spec +++ b/hivex.spec @@ -10,7 +10,7 @@ Name: hivex Version: 1.3.16 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Read and write Windows Registry binary hive files License: LGPLv2 @@ -26,6 +26,9 @@ Source1: http://libguestfs.org/download/hivex/%{name}-%{version}.tar.gz.s Source2: libguestfs.keyring %endif +# Upstream patch to fix regression of RHBZ#1145056. +Patch1: 0001-lib-Reset-errno-to-zero-to-avoid-erroneously-returni.patch + BuildRequires: perl-interpreter BuildRequires: perl-devel BuildRequires: perl-generators @@ -277,6 +280,9 @@ make check %changelog +* Tue Jan 22 2019 Richard W.M. Jones - 1.3.16-2 +- Add upstream patch to fix regression of RHBZ#1145056. + * Thu Jan 17 2019 Richard W.M. Jones - 1.3.16-1 - New upstream version 1.3.16.