summaryrefslogtreecommitdiff
path: root/pidl/lib/Parse/Pidl/Samba4
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-01-05 10:05:47 +0100
committerStefan Metzmacher <metze@samba.org>2011-01-05 10:24:49 +0100
commit2e45cd15ec4719b87e45db5e4a5c43dc1432936f (patch)
treea5e60e5d3c0ddd4d2f9476736f6bf0031bb0b858 /pidl/lib/Parse/Pidl/Samba4
parent2868fc8a91c5ba410cb004aa56084dd906da4177 (diff)
downloadsamba-2e45cd15ec4719b87e45db5e4a5c43dc1432936f.tar.gz
samba-2e45cd15ec4719b87e45db5e4a5c43dc1432936f.tar.bz2
samba-2e45cd15ec4719b87e45db5e4a5c43dc1432936f.zip
pidl:Samba4/Python: fix segfault when setting pointers to scalars.
metze
Diffstat (limited to 'pidl/lib/Parse/Pidl/Samba4')
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/Python.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/Python.pm b/pidl/lib/Parse/Pidl/Samba4/Python.pm
index 60352ae8d7..fa18056882 100644
--- a/pidl/lib/Parse/Pidl/Samba4/Python.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/Python.pm
@@ -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;");
}