From e489df5024acc86b0bd3c9f41844b06ff7560d24 Mon Sep 17 00:00:00 2001 From: Michael Mann Date: Thu, 18 Sep 2014 22:40:49 -0400 Subject: Don't assert that values fit in 32 bits if the NDR64 flag is set. For now, this just pacifies fuzz-testing. If real world examples have this, there needs to be a drastic overhaul to support fields that could be either 32 or 64-bit values. Bug:9329 Change-Id: I3e28808ca0291868a5f84258b0ee1e2a922703c2 Reviewed-on: https://code.wireshark.org/review/4189 Reviewed-by: Michael Mann --- plugins/profinet/packet-dcerpc-pn-io.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/profinet/packet-dcerpc-pn-io.c b/plugins/profinet/packet-dcerpc-pn-io.c index 95588554a8..f8ebf4c1c6 100644 --- a/plugins/profinet/packet-dcerpc-pn-io.c +++ b/plugins/profinet/packet-dcerpc-pn-io.c @@ -6659,7 +6659,8 @@ dissect_LogData_block(tvbuff_t *tvb, int offset, guint64 u64LocaltimeStamp; e_uuid_t aruuid; guint32 u32EntryDetail; - + dcerpc_info di; /* fake dcerpc_info struct */ + dcerpc_call_value call_data; if (u8BlockVersionHigh != 1 || u8BlockVersionLow != 0) { expert_add_info_format(pinfo, item, &ei_pn_io_block_version, @@ -6667,8 +6668,14 @@ dissect_LogData_block(tvbuff_t *tvb, int offset, return offset; } + di.conformant_run = 0; + /* we need di->call_data->flags.NDR64 == 0 */ + call_data.flags = 0; + di.call_data = &call_data; + di.dcerpc_procedure_name = ""; + /* ActualLocalTimeStamp */ - offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, drep, + offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, &di, drep, hf_pn_io_actual_local_time_stamp, &u64ActualLocaltimeStamp); /* NumberOfLogEntries */ offset = dissect_dcerpc_uint16(tvb, offset, pinfo, tree, drep, @@ -6676,7 +6683,7 @@ dissect_LogData_block(tvbuff_t *tvb, int offset, while (u16NumberOfLogEntries--) { /* LocalTimeStamp */ - offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, drep, + offset = dissect_dcerpc_uint64(tvb, offset, pinfo, tree, &di, drep, hf_pn_io_local_time_stamp, &u64LocaltimeStamp); /* ARUUID */ offset = dissect_dcerpc_uuid_t(tvb, offset, pinfo, tree, drep, -- cgit v1.2.1