Wireshark-commits: [Wireshark-commits] master-1.12 cdb1fc6: websocket: avoid recursion, use tcp_dis
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=cdb1fc695db45ee603133c9d8250c47fcd46d088
Submitter: Anders Broman (a.broman58@xxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark
Commits:
cdb1fc6 by Peter Wu (peter@xxxxxxxxxxxxx):
websocket: avoid recursion, use tcp_dissect_pdus
Use tcp_dissect_pdus to handle reassembly and avoid a recursion in
dissect_websocket. The HTTP dissector is modified to preserve
desegmentation functionality (tested with the capture from bug 8448).
As tcp_dissect_pdus is used now, the workaround for bug 8448 can be
removed and the actual frame dissection logic becomes simpler (the
length is checked in get_websocket_frame_length).
Bug: 10989
Change-Id: I67af96a6c7be88c2a77e1c4138abe90bdb880774
Reviewed-on: https://code.wireshark.org/review/7285
Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Anders Broman <a.broman58@xxxxxxxxx>
(cherry picked from commit 4ee6bcbd2e03a25f1e6b0239558d9edeaf8040c0)
[conflict resolution: commit f3f736c67f915c7a67176a100fac56d46226cb35
is not applied as the code was moved; dropped data parameter for
get_websocket_frame_length; keep ws_tree=NULL in context]
Reviewed-on: https://code.wireshark.org/review/7639
Reviewed-by: Peter Wu <peter@xxxxxxxxxxxxx>
Tested-by: Peter Wu <peter@xxxxxxxxxxxxx>
Actions performed:
from a29893b skip the payload if it's empty
adds cdb1fc6 websocket: avoid recursion, use tcp_dissect_pdus
Summary of changes:
epan/dissectors/packet-http.c | 4 ++
epan/dissectors/packet-websocket.c | 102 +++++++++++++++++++-----------------
2 files changed, 57 insertions(+), 49 deletions(-)