summaryrefslogtreecommitdiffstats
path: root/perl
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2009-05-11 10:51:21 +0100
committerRichard Jones <rjones@redhat.com>2009-05-11 10:52:34 +0100
commit09128ca421f13da9fb6446cd7b09b0ae89c3876f (patch)
tree555df0ceb10b7745609a04048bde2bffdab1e905 /perl
parentd43dac69483e8ec62e8356d93f761684ce2f5cc8 (diff)
downloadlibguestfs-09128ca421f13da9fb6446cd7b09b0ae89c3876f.tar.gz
libguestfs-09128ca421f13da9fb6446cd7b09b0ae89c3876f.tar.xz
libguestfs-09128ca421f13da9fb6446cd7b09b0ae89c3876f.zip
Perl bindings fix: Not enough memory was allocated for array params.
Diffstat (limited to 'perl')
-rw-r--r--perl/Guestfs.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/perl/Guestfs.xs b/perl/Guestfs.xs
index 27e03d06..5ce5def1 100644
--- a/perl/Guestfs.xs
+++ b/perl/Guestfs.xs
@@ -68,7 +68,7 @@ XS_unpack_charPtrPtr (SV *arg) {
croak ("array reference expected");
av = (AV *)SvRV (arg);
- ret = malloc (av_len (av) + 1 + 1);
+ ret = malloc ((av_len (av) + 1 + 1) * sizeof (char *));
if (!ret)
croak ("malloc failed");