git.annexia.org
/
libguestfs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Perl bindings fix: Not enough memory was allocated for array params.
[libguestfs.git]
/
perl
/
Guestfs.xs
diff --git
a/perl/Guestfs.xs
b/perl/Guestfs.xs
index
27e03d0
..
5ce5def
100644
(file)
--- 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);
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");
if (!ret)
croak ("malloc failed");