aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2018-12-17 01:07:25 +0100
committerPeter Wu <peter@lekensteyn.nl>2018-12-29 10:38:13 +0000
commit53d8e6dcf8c639a13f8c52a11df829b854c1b9ac (patch)
tree44b839d1a202f52551e10fdcaf68f34052bf3a45 /test
parente1c02bd9206d64665afa5ecf705d578a36bbd18a (diff)
Lua: fix crash in reloading Lua plugins that use FileHandler
Reloading Lua plugins did not actually remove registered FileHandler instances which resulted in a use-after-free of lua_State. Fix this by tracking instances and release them in wslua_deregister_filehandlers. Other required fixes to allow reregistration after reloading: - Fix END_FILEHANDLER_ROUTINE not to block all new registrations. - wtap file subtypes are apparently persistent, even after "unregistering". Fix this by looking up the previous subtype that matches the FileHandler short name. Add a small sanity check to wtap_register_file_type_subtypes to prevent internal handlers from being overwritten. This patch creates a potential memleak of registered_file_handlers as wslua_deregister_filehandlers is not called on program exit (yet?). Bug: 13264 Change-Id: I4f5935cde6ff8dc4de333359bad3efca96d4fb9b Reviewed-on: https://code.wireshark.org/review/31068 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu <peter@lekensteyn.nl>
Diffstat (limited to 'test')
0 files changed, 0 insertions, 0 deletions