mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Perl bindings fix: Not enough memory was allocated for array params.
This commit is contained in:
1
BUGS
1
BUGS
@@ -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]
|
||||
|
||||
@@ -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");
|
||||
|
||||
|
||||
@@ -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\");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user