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

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