diff options
-rw-r--r-- | BUGS | 1 | ||||
-rw-r--r-- | perl/Guestfs.xs | 2 | ||||
-rwxr-xr-x | src/generator.ml | 2 |
3 files changed, 3 insertions, 2 deletions
@@ -54,3 +54,4 @@ quite hard to fix cleanly. [perl] Perl bindings cause a segfault when you call any command which takes a StringList (eg. $g->command). +[should be fixed now] 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"); diff --git a/src/generator.ml b/src/generator.ml index f7057d0e..7f248027 100755 --- a/src/generator.ml +++ b/src/generator.ml @@ -4862,7 +4862,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\"); |