From 09128ca421f13da9fb6446cd7b09b0ae89c3876f Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Mon, 11 May 2009 10:51:21 +0100 Subject: Perl bindings fix: Not enough memory was allocated for array params. --- perl/Guestfs.xs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl') 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"); -- cgit