diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-03-27 23:22:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:49:40 -0500 |
commit | 256054f4e12ddd2d65734cda8a33ee24e50931e8 (patch) | |
tree | eacfd000dc4b7bc30772803414e5a535f186c94c /source4/pidl/lib/Parse/Pidl | |
parent | 452f8e76cb4ca89db11f882e47dd94af06476da5 (diff) | |
download | samba-256054f4e12ddd2d65734cda8a33ee24e50931e8.tar.gz samba-256054f4e12ddd2d65734cda8a33ee24e50931e8.tar.bz2 samba-256054f4e12ddd2d65734cda8a33ee24e50931e8.zip |
r21996: Fix a bug for invalid casts of pointers.
Patch by Ronnie Sahlberg.
(This used to be commit 52a13ddf0242318785b05a8888640b2172435c45)
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm index 279f4c0cf2..e6dd954b74 100644 --- a/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm +++ b/source4/pidl/lib/Parse/Pidl/Wireshark/NDR.pm @@ -162,7 +162,14 @@ sub Enum($$$) pidl_code "$dissectorname(tvbuff_t *tvb _U_, int offset _U_, packet_info *pinfo _U_, proto_tree *tree _U_, guint8 *drep _U_, int hf_index _U_, guint32 *param _U_)"; pidl_code "{"; indent; - pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, param);"; + pidl_code "g$e->{BASE_TYPE} parameter;"; + pidl_code "parameter=(g$e->{BASE_TYPE})*param;"; + pidl_code "offset = dissect_ndr_$e->{BASE_TYPE}(tvb, offset, pinfo, tree, drep, hf_index, ¶meter);"; + pidl_code "if(param){"; + indent; + pidl_code "*param=(guint32)parameter;"; + deindent; + pidl_code "}"; pidl_code "return offset;"; deindent; pidl_code "}\n"; |