aboutsummaryrefslogtreecommitdiffstats
path: root/epan/dissectors/packet-dcerpc.c
diff options
context:
space:
mode:
authorRalph Boehme <slow@samba.org>2019-08-25 10:36:26 +0200
committerAnders Broman <a.broman58@gmail.com>2019-08-27 04:02:39 +0000
commitc9f2b9b3edcc7d99a0eb9b506ff3b5f0101bd1a8 (patch)
treef997beac0bd1a538137d73f90f3bf797bbd44b65 /epan/dissectors/packet-dcerpc.c
parentdf3141cb779951d99fa70a6e9ee8e05a79cda603 (diff)
DCERPC: workaround that pidl always emits dissect_deferred_pointers()
Commit f57cf9e56c90c0c0c724f415eff35821afaaf849 introduced a DISSECTOR_ASSERT() that revealed a deficiency in pidl: currently pidl unconditionally adds calls to dissect_deferred_pointers() which breaks dissecting any RPC function that has only scalar arguments: Warn Dissector bug, protocol RPCMDSSVC, in packet 51: epan/dissectors/packet-dcerpc.c:2940: failed assertion "list_ndr_pointer_list" Bug: 16022 Change-Id: I9d3522a3e17ef79b9a8a5acb018104ab398a512a Reviewed-on: https://code.wireshark.org/review/34364 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/dissectors/packet-dcerpc.c')
-rw-r--r--epan/dissectors/packet-dcerpc.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c
index 9bf6cf3bc9..d888883edb 100644
--- a/epan/dissectors/packet-dcerpc.c
+++ b/epan/dissectors/packet-dcerpc.c
@@ -2936,8 +2936,13 @@ dissect_deferred_pointers(packet_info *pinfo, tvbuff_t *tvb, int offset, dcerpc_
int len;
GSList *current_ndr_pointer_list;
- /* The list is assumed to be non-empty, otherwise this should not be called. */
- DISSECTOR_ASSERT(list_ndr_pointer_list);
+ /*
+ * pidl has a difficiency of unconditionally emitting calls
+ * dissect_deferred_pointers() to the generated dissectors.
+ */
+ if (list_ndr_pointer_list == NULL) {
+ return offset;
+ }
/* Probably not necessary, it is supposed to prevent more pointers from
* being added to the list. */