No generator in tarball, patch generated file instead.

This commit is contained in:
Richard W.M. Jones 2010-12-16 13:54:57 +00:00
parent 4fa487a6dd
commit f940d5b69b
3 changed files with 16 additions and 28 deletions

View File

@ -1,25 +0,0 @@
From b2e74e79b89573b2195f359fb38f68e9b900cce2 Mon Sep 17 00:00:00 2001
From: Richard W.M. Jones <rjones@redhat.com>
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

View File

@ -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~

View File

@ -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 <rjones@redhat.com> - 1.2.4-2
* Thu Dec 16 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-3
- Backport upstream patch to fix segfault in Hivex.value_value binding.
* Thu Dec 2 2010 Richard W.M. Jones <rjones@redhat.com> - 1.2.4-1