dcerpc: add check for mutually exclusive function pointers

Found by clang analyzer.

Change-Id: Idb2e80edbb5b264fd257a7b4208ff75bd543df88
Reviewed-on: https://code.wireshark.org/review/10970
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Petri-Dish: Anders Broman <a.broman58@gmail.com>
Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Dario Lombardo 2015-10-12 23:33:15 +02:00 committed by Michael Mann
parent 52970ef9f8
commit 4ea610a54a
1 changed files with 3 additions and 0 deletions

View File

@ -2199,6 +2199,9 @@ dissect_ndr_ucarray_core(tvbuff_t *tvb, gint offset, packet_info *pinfo,
int old_offset;
int conformance_size = 4;
/* ensure that just one pointer is set in the call */
DISSECTOR_ASSERT((fnct_bytes && !fnct_block) || (!fnct_bytes && fnct_block));
if (di->call_data->flags & DCERPC_IS_NDR64) {
conformance_size = 8;
}