From f940d5b69b2a8c3c8c24a52bc2ee550870895957 Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Thu, 16 Dec 2010 13:54:57 +0000 Subject: [PATCH] No generator in tarball, patch generated file instead. --- ...egfault-in-Hivex.value_value-binding.patch | 25 ------------------- hivex-1.2.4-fix-ocaml-value-value.patch | 13 ++++++++++ hivex.spec | 6 ++--- 3 files changed, 16 insertions(+), 28 deletions(-) delete mode 100644 0001-ocaml-Fix-segfault-in-Hivex.value_value-binding.patch create mode 100644 hivex-1.2.4-fix-ocaml-value-value.patch diff --git a/0001-ocaml-Fix-segfault-in-Hivex.value_value-binding.patch b/0001-ocaml-Fix-segfault-in-Hivex.value_value-binding.patch deleted file mode 100644 index 638cefc..0000000 --- a/0001-ocaml-Fix-segfault-in-Hivex.value_value-binding.patch +++ /dev/null @@ -1,25 +0,0 @@ -From b2e74e79b89573b2195f359fb38f68e9b900cce2 Mon Sep 17 00:00:00 2001 -From: Richard W.M. Jones -Date: Thu, 16 Dec 2010 13:41:59 +0000 -Subject: [PATCH] ocaml: Fix segfault in Hivex.value_value binding. - ---- - generator/generator.ml | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/generator/generator.ml b/generator/generator.ml -index 37e5b5c..7c43f1f 100755 ---- a/generator/generator.ml -+++ b/generator/generator.ml -@@ -1873,7 +1873,7 @@ copy_type_value (const char *r, size_t len, hive_type t) - Store_field (rv, 0, v); - v = caml_alloc_string (len); - memcpy (String_val (v), r, len); -- caml_modify (&Field (rv, 1), len); -+ caml_modify (&Field (rv, 1), v); - CAMLreturn (rv); - } - --- -1.7.3.3 - diff --git a/hivex-1.2.4-fix-ocaml-value-value.patch b/hivex-1.2.4-fix-ocaml-value-value.patch new file mode 100644 index 0000000..f5e3b22 --- /dev/null +++ b/hivex-1.2.4-fix-ocaml-value-value.patch @@ -0,0 +1,13 @@ +diff -ur hivex-1.2.4.old/ocaml/hivex_c.c hivex-1.2.4/ocaml/hivex_c.c +--- hivex-1.2.4.old/ocaml/hivex_c.c 2010-11-26 18:12:20.000000000 +0000 ++++ hivex-1.2.4/ocaml/hivex_c.c 2010-12-16 13:53:09.049192941 +0000 +@@ -813,7 +813,7 @@ + Store_field (rv, 0, v); + v = caml_alloc_string (len); + memcpy (String_val (v), r, len); +- caml_modify (&Field (rv, 1), len); ++ caml_modify (&Field (rv, 1), v); + CAMLreturn (rv); + } + +Only in hivex-1.2.4/ocaml: hivex_c.c~ diff --git a/hivex.spec b/hivex.spec index 4e47045..c4965a2 100644 --- a/hivex.spec +++ b/hivex.spec @@ -7,7 +7,7 @@ Name: hivex Version: 1.2.4 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Read and write Windows Registry binary hive files Group: Development/Libraries @@ -39,7 +39,7 @@ Conflicts: libguestfs <= 1:1.0.84 Patch0: %{name}-1.2.3-dirs.patch # Fix segfault in OCaml binding of Hivex.value_value. -Patch1: 0001-ocaml-Fix-segfault-in-Hivex.value_value-binding.patch +Patch1: hivex-1.2.4-fix-ocaml-value-value.patch %description @@ -256,7 +256,7 @@ rm -rf $RPM_BUILD_ROOT %changelog -* Thu Dec 16 2010 Richard W.M. Jones - 1.2.4-2 +* Thu Dec 16 2010 Richard W.M. Jones - 1.2.4-3 - Backport upstream patch to fix segfault in Hivex.value_value binding. * Thu Dec 2 2010 Richard W.M. Jones - 1.2.4-1