summaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-03-25 11:57:35 +0000
committerRichard Jones <rjones@redhat.com>2010-03-25 11:59:06 +0000
commita2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8 (patch)
treec5d060925d91ce15425b4b9ec50f05627a07f3ea /generator
parent0b960523cfccd4614dd644fa3c67d59bc02dc9bb (diff)
downloadhivex-a2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8.tar.gz
hivex-a2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8.tar.xz
hivex-a2f495804a05c0c9d3532dbf7cf5bb3cd2df64f8.zip
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.
Diffstat (limited to 'generator')
-rwxr-xr-xgenerator/generator.ml4
1 files 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";