From a0f8ff3cbdbfe475496d210e3d25ecb5bc35fdf3 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 24 Apr 2006 14:41:13 +0000 Subject: r15202: Don't derefence NULL pointers - found by the IBM Checker (This used to be commit f6a3e8b69d2a303e7e4f8924e6735c4e168a363a) --- source4/pidl/lib/Parse/Pidl/Samba4/EJS.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'source4') 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; -- cgit