Wireshark-commits: [Wireshark-commits] lts-1.12.1 51233ad: websocket: avoid recursion, use tcp_diss
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=51233ad116e907201da5791a12e0ad8e95f31443
Submitter: Balint Reczey (balint@xxxxxxxxxxxxxxx)
Changed: branch: lts-1.12.1
Repository: wireshark
Commits:
51233ad 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>
(cherry picked from commit cdb1fc695db45ee603133c9d8250c47fcd46d088)
Reviewed-on: https://code.wireshark.org/review/8635
Petri-Dish: Peter Wu <peter@xxxxxxxxxxxxx>
Reviewed-by: Balint Reczey <balint@xxxxxxxxxxxxxxx>
Actions performed:
from 8c69292 lbmr: fix possible infinite loop
adds 51233ad 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(-)