profinet: add a nested fake variable to avoid null dereference.

CID: 1373682
CID: 1394504

Change-Id: I12ac26aad43ba817f71638605ecd6ad05d1af455
Reviewed-on: https://code.wireshark.org/review/25076
Petri-Dish: Dario Lombardo <lomato@gmail.com>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2017-12-29 23:36:25 +01:00 committed by Michael Mann
parent 5daead33ae
commit d17c26eafb
1 changed files with 6 additions and 0 deletions

View File

@ -3708,6 +3708,7 @@ dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
guint64 u64AMDeviceIdentificationDeviceSubID;
guint64 u64AMDeviceIdentificationDeviceID;
guint64 u64AMDeviceIdentificationVendorID;
@ -3716,6 +3717,8 @@ dissect_RS_IdentificationInfo(tvbuff_t *tvb, int offset,
proto_item *sub_item;
proto_tree *sub_tree;
di.call_data = &dcv;
sub_item = proto_tree_add_item(tree, hf_pn_io_am_device_identification, tvb, offset, 8, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_device_identification);
@ -4622,6 +4625,7 @@ dissect_AM_device_identification(tvbuff_t *tvb, int offset,
packet_info *pinfo, proto_tree *tree, guint8 *drep)
{
dcerpc_info di; /* fake dcerpc_info struct */
dcerpc_call_value dcv; /* fake dcerpc_call_value struct */
guint64 u64AMDeviceIdentificationDeviceSubID;
guint64 u64AMDeviceIdentificationDeviceID;
guint64 u64AMDeviceIdentificationVendorID;
@ -4630,6 +4634,8 @@ packet_info *pinfo, proto_tree *tree, guint8 *drep)
proto_item *sub_item;
proto_tree *sub_tree;
di.call_data = &dcv;
sub_item = proto_tree_add_item(tree, hf_pn_io_am_device_identification, tvb, offset, 8, ENC_BIG_ENDIAN);
sub_tree = proto_item_add_subtree(sub_item, ett_pn_io_am_device_identification);
dissect_dcerpc_uint64(tvb, offset, pinfo, sub_tree, &di, drep,