Wireshark-commits: [Wireshark-commits] master-1.12 474728d: Bug 10233 - Wireshark crashes if Lua he
URL: https://code.wireshark.org/review/gitweb?p=wireshark.git;a=commit;h=474728db8aec9b331a090b4a512ff687531e3b93
Submitter: Michael Mann (mmann78@xxxxxxxxxxxx)
Changed: branch: master-1.12
Repository: wireshark
Commits:
474728d by Hadriel Kaplan (hadriel@xxxxxxxxxxxxxxxxx):
Bug 10233 - Wireshark crashes if Lua heuristic dissector returns true
Because call_heur_dissector_direct() didn't set the pinfo->heur_list_name
before calling the heuristic dissector, heur_dissect_lua() would invoke
report_failure(). Unfortunately, calling report_failure() within a dissector
can cause problems because GTK continues invoking timed callbacks while
it displays the modal dialog created by report_failure()... without yet
returning from report_failure(). In such a case, it's possible for
epan_dissect_run() to be called while still within the execution of a
previous call to epan_dissect_run(), which casues an assert since
epan_dissect_run() is not reentrant.
So this commit both fixes the call_heur_dissector_direct() bug as well
as avoids using report_failure() within heur_dissect_lua(). It also
upadtes the dissector.lua script used in the testsuite to match the one
pubshied on the wiki, since that script's heuristic dissector triggered
the bug.
Bug: 10233
Change-Id: If022604347745fadac01c02d370ca1a5d3f88b5b
Reviewed-on: https://code.wireshark.org/review/6040
Reviewed-by: Michael Mann <mmann78@xxxxxxxxxxxx>
Petri-Dish: Michael Mann <mmann78@xxxxxxxxxxxx>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@xxxxxxxxxxxxx>
Reviewed-by: Hadriel Kaplan <hadrielk@xxxxxxxxx>
Tested-by: Hadriel Kaplan <hadrielk@xxxxxxxxx>
(cherry picked from commit 2391a436e60b4a1823be983583d5ef34a7faf6de)
Reviewed-on: https://code.wireshark.org/review/6134
Petri-Dish: Hadriel Kaplan <hadrielk@xxxxxxxxx>
Actions performed:
from d041bb1 rtsp: Fix what (appears to be)/(may be) a minor bug.
adds 474728d Bug 10233 - Wireshark crashes if Lua heuristic dissector returns true
Summary of changes:
epan/packet.c | 2 +
epan/wslua/init_wslua.c | 22 ++++--
test/lua/dissector.lua | 183 +++++++++++++++++++++++++++++++++++++++--------
3 files changed, 172 insertions(+), 35 deletions(-)