diff options
author | Peter Wu <peter@lekensteyn.nl> | 2018-10-09 19:58:10 +0200 |
---|---|---|
committer | Anders Broman <a.broman58@gmail.com> | 2018-10-10 04:08:17 +0000 |
commit | 9c61757dc25dc359bb9666954667b4405a8a3825 (patch) | |
tree | 9f11334d39c8db15a2027eeb4d3de8753c6d5adf /epan/except.c | |
parent | 353ad11974a6a81dfdb35a4dea123efa7e2adebb (diff) |
except: detect exception stack corruption
Valgrind found an invalid read in the capture from Bug 15173 which was
not detected by ASAN, probably because 'top' pointed to a valid stack
address. Try to catch such issues with an explicit invariant check.
Change-Id: I3e2d90f053209c133ea2edc9c7990a2fd39bd236
Ping-Bug: 15189
Reviewed-on: https://code.wireshark.org/review/30101
Petri-Dish: Peter Wu <peter@lekensteyn.nl>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
Diffstat (limited to 'epan/except.c')
-rw-r--r-- | epan/except.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/epan/except.c b/epan/except.c index dc95301d51..4f911418c4 100644 --- a/epan/except.c +++ b/epan/except.c @@ -260,6 +260,7 @@ void except_setup_try(struct except_stacknode *esn, struct except_stacknode *except_pop(void) { struct except_stacknode *top = get_top(); + assert (top->except_type == XCEPT_CLEANUP || top->except_type == XCEPT_CATCHER); set_top(top->except_down); return top; } |