pidl:NDR/Parser: initialize [skip] values in ndr_pull_*
authorStefan Metzmacher <metze@samba.org>
Tue, 13 Jun 2017 07:57:33 +0000 (09:57 +0200)
committerStefan Metzmacher <metze@samba.org>
Mon, 26 Jun 2017 06:47:14 +0000 (08:47 +0200)
It's too dangerous to leave values uninitialzed!
[skip_noinit] can be used if required.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
pidl/lib/Parse/Pidl/Samba4/NDR/Parser.pm

index a32e9eb..7a73126 100644 (file)
@@ -1128,6 +1128,9 @@ sub ParseElementPullLevel
 
        if (has_property($e, "skip") or has_property($e, "skip_noinit")) {
                $self->pidl("/* [skip] '$var_name' */");
+               if (not has_property($e, "skip_noinit")) {
+                       $self->pidl("ZERO_STRUCT($var_name);");
+               }
                return;
        }