summaryrefslogtreecommitdiff
path: root/source4/pidl/lib/Parse/Pidl
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-04-24 14:41:13 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:16 -0500
commita0f8ff3cbdbfe475496d210e3d25ecb5bc35fdf3 (patch)
tree46060ecbe8c40ac6791b4785544abc7c379f2b93 /source4/pidl/lib/Parse/Pidl
parenta30340affe789cd0c001e34c8e523fbba0742cfc (diff)
downloadsamba-a0f8ff3cbdbfe475496d210e3d25ecb5bc35fdf3.tar.gz
samba-a0f8ff3cbdbfe475496d210e3d25ecb5bc35fdf3.tar.bz2
samba-a0f8ff3cbdbfe475496d210e3d25ecb5bc35fdf3.zip
r15202: Don't derefence NULL pointers - found by the IBM Checker
(This used to be commit f6a3e8b69d2a303e7e4f8924e6735c4e168a363a)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r--source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
index 41ea1e8eaa..91938c038e 100644
--- a/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
+++ b/source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm
@@ -450,7 +450,11 @@ sub EjsPushPointer($$$$$)
my ($e, $l, $var, $name, $env) = @_;
pidl "if (NULL == $var) {";
indent;
- pidl "NDR_CHECK(ejs_push_null(ejs, v, $name));";
+ if ($l->{POINTER_TYPE} eq "ref") {
+ pidl "return NT_STATUS_INVALID_PARAMETER_MIX;";
+ } else {
+ pidl "NDR_CHECK(ejs_push_null(ejs, v, $name));";
+ }
deindent;
pidl "} else {";
indent;