URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=0e0e56d05bfc34026a9923f847b8c8d53136256f
Submitter: "Anders Broman <a.broman58@xxxxxxxxx>"
Changed: branch: master
Repository: wireshark
Commits:
0e0e56d by Peter Wu (peter@xxxxxxxxxxxxx):
DCERPC: simplify pointer list tracking
Observe that the "current_depth" and "len_ndr_pointer_list" just track
the length of the current singly linked list in order to insert (append)
or remove [the last] element (a linked list of lists and a linked list
of pointers respectively). Replace these callers by equivalents that do
not require explicit length tracking, internally they both have to do a
O(n) lookup anyway.
There used to be a case where "current_depth" could run out-of-sync, no
longer tracking the actual list length: when the callback (tnpd->fnct or
tnpd->callback) triggers an exception. I believe this was unintentional.
No functional change intended, but this should make further changes to
the data structures easier.
Change-Id: I3cb13aba22caa87dc7baba411cf34f47792f7bb7
Ping-Bug: 14735
Fixes: v2.5.0rc0-292-g6bd87bdd5d ("dcerpc: improve greatly the speed of processing of DCERPC packets")
Reviewed-on: https://code.wireshark.org/review/30114
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
Actions performed:
from ec5adb0 tvbuff_composite: fix buffer overflow due to wrong offset adjustment
add 0e0e56d DCERPC: simplify pointer list tracking
Summary of changes:
epan/dissectors/packet-dcerpc.c | 51 ++++++++++++++++-------------------------
1 file changed, 20 insertions(+), 31 deletions(-)