Author: jelmer
Date: 2006-04-24 14:41:13 +0000 (Mon, 24 Apr 2006)
New Revision: 15202

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=15202

Log:
Don't derefence NULL pointers - found by the IBM Checker

Modified:
   branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm


Changeset:
Modified: branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm
===================================================================
--- branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm 2006-04-24 
14:20:44 UTC (rev 15201)
+++ branches/SAMBA_4_0/source/pidl/lib/Parse/Pidl/Samba4/EJS.pm 2006-04-24 
14:41:13 UTC (rev 15202)
@@ -450,7 +450,11 @@
        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;

Reply via email to