summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2007-10-17 08:26:55 +0200
committerStefan Metzmacher <metze@samba.org>2007-12-21 05:43:08 +0100
commitc28074da329d7370e978df65e899c8cf834307eb (patch)
tree9cec3431dbf63933b7f53929ab951e076e829c91
parentaf0832769f0876f293d89ccb802872836df167b3 (diff)
downloadsamba-c28074da329d7370e978df65e899c8cf834307eb.tar.gz
samba-c28074da329d7370e978df65e899c8cf834307eb.tar.bz2
samba-c28074da329d7370e978df65e899c8cf834307eb.zip
r25674: fix crash bug in pidl generated client code, this
could have happend with [in,out,unique] pointers when the clients sends a valid pointer, but the server reponse with a NULL pointer (as samba-3.0.26a do for some calls). I've tested with midl to see how windows handles this situation and also the reverse case where the client sends NULL and the server reposnse with non-NULL. It appears that midl generated code just ignores this and only copies the result if both pointers are non-NULL. metze (This used to be commit 7203f717a676a741e49f96f2d477f4f459575caf)
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
index 9c3f01ad93..f6c9a04a8e 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
@@ -91,7 +91,7 @@ sub ParseFunction($$$)
if ($e->{LEVELS}[0]->{TYPE} eq "POINTER") {
$level = 1;
if ($e->{LEVELS}[0]->{POINTER_TYPE} ne "ref") {
- $self->pidl("if ( $e->{NAME} ) {");
+ $self->pidl("if ($e->{NAME} && r.out.$e->{NAME}) {");
$self->indent;
}
}