From: Richard W.M. Jones Date: Thu, 16 Dec 2010 13:41:59 +0000 (+0000) Subject: ocaml: Fix segfault in Hivex.value_value binding. X-Git-Tag: 1.2.5~11 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=b2e74e79b89573b2195f359fb38f68e9b900cce2;p=hivex.git ocaml: Fix segfault in Hivex.value_value binding. --- 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); }