Blame SOURCES/0002-value-Set-errno-0-on-non-error-path-in-hivex_value_d.patch

c1e277
From 6a4dac0da1f318a1114363b274fcee76e73fcccf Mon Sep 17 00:00:00 2001
c1e277
From: "Richard W.M. Jones" <rjones@redhat.com>
c1e277
Date: Mon, 22 Sep 2014 15:08:44 +0100
c1e277
Subject: [PATCH 02/12] value: Set errno = 0 on non-error path in
c1e277
 hivex_value_data_cell_offset (RHBZ#1145056).
c1e277
c1e277
hivex_value_data_cell_offset may return 0 to indicate that the data is
c1e277
inline.  This is not an error return, but it was possible for errno to
c1e277
have a random (non-zero) value along this path.  Explicitly set errno
c1e277
= 0 on this path.
c1e277
c1e277
Thanks: Wei Shi
c1e277
(cherry picked from commit 9763f96a1374486c7d00ea5c04b8048fe69e63f3)
c1e277
---
c1e277
 lib/value.c | 1 +
c1e277
 1 file changed, 1 insertion(+)
c1e277
c1e277
diff --git a/lib/value.c b/lib/value.c
c1e277
index f222b41..aa80238 100644
c1e277
--- a/lib/value.c
c1e277
+++ b/lib/value.c
c1e277
@@ -276,6 +276,7 @@ hivex_value_data_cell_offset (hive_h *h, hive_value_h value, size_t *len)
c1e277
     /* There is no other location for the value data. */
c1e277
     if (len)
c1e277
       *len = 0;
c1e277
+    errno = 0;
c1e277
     return 0;
c1e277
   } else {
c1e277
     if (len)
c1e277
-- 
c1e277
1.8.3.1
c1e277