1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00

pidl:Samba4/Python: fix segfault when setting pointers to scalars.

metze
This commit is contained in:
Stefan Metzmacher 2011-01-05 10:05:47 +01:00
parent 2868fc8a91
commit 2e45cd15ec

View File

@ -1000,6 +1000,9 @@ sub ConvertObjectFromPythonLevel($$$$$$$$)
# then this is where we would need to allocate it
if ($l->{POINTER_TYPE} eq "ref") {
$self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
} elsif ($nl->{TYPE} eq "DATA" and Parse::Pidl::Typelist::is_scalar($nl->{DATA_TYPE})
and not Parse::Pidl::Typelist::scalar_is_reference($nl->{DATA_TYPE})) {
$self->pidl("$var_name = talloc_ptrtype($mem_ctx, $var_name);");
} else {
$self->pidl("$var_name = NULL;");
}