pidl:NDR/Parser: initialize [skip] values in ndr_pull_*

Pick up change from Samba:

    commit 823bc4c07add242a5a1d0cd25942ebaab3cd0e23
    Author: Stefan Metzmacher <metze@samba.org>
    Date:   Tue Jun 13 09:57:33 2017 +0200

        pidl:NDR/Parser: initialize [skip] values in ndr_pull_*

        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>

Change-Id: I85a173e21fca509fc417ff2532097fd9a220ccd9
Reviewed-on: https://code.wireshark.org/review/23698
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2017-09-24 20:04:54 -07:00
parent 67522b6130
commit 8fdcc95456
1 changed files with 3 additions and 0 deletions

View 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;
}