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 file changed, 1 insertion(+), 1 deletion(-) 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.8.3.1