From: Richard Jones Date: Thu, 25 Mar 2010 11:57:35 +0000 (+0000) Subject: perl: Fix $h->value_type and $h->value_value methods. X-Git-Tag: 1.2.1~15 X-Git-Url: http://git.annexia.org/?a=commitdiff_plain;h=a2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8;p=hivex.git perl: Fix $h->value_type and $h->value_value methods. These were passing the type & len arguments the wrong way round to the C function, resulting in data corruption in the returned values. --- diff --git a/generator/generator.ml b/generator/generator.ml index d7b9875..230b66b 100755 --- a/generator/generator.ml +++ b/generator/generator.ml @@ -2415,7 +2415,7 @@ DESTROY (h) pr " size_t len;\n"; pr " hive_type type;\n"; pr " PPCODE:\n"; - pr " r = hivex_%s (%s, &len, &type);\n" + pr " r = hivex_%s (%s, &type, &len);\n" name (String.concat ", " c_params); free_args (); pr " if (r == -1)\n"; @@ -2431,7 +2431,7 @@ DESTROY (h) pr " size_t len;\n"; pr " hive_type type;\n"; pr " PPCODE:\n"; - pr " r = hivex_%s (%s, &len, &type);\n" + pr " r = hivex_%s (%s, &type, &len);\n" name (String.concat ", " c_params); free_args (); pr " if (r == NULL)\n";