From a2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8 Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Thu, 25 Mar 2010 11:57:35 +0000 Subject: [PATCH] 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. --- generator/generator.ml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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"; -- 1.8.3.1