summaryrefslogtreecommitdiff
path: root/epan/proto.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss@ulticom.com>2012-02-13 03:14:46 +0000
committerJeff Morriss <jeff.morriss@ulticom.com>2012-02-13 03:14:46 +0000
commit21a422463ef37e09bffb6dafbc9e16543e38d151 (patch)
tree8397c71847af679b5b9a2330c93a046a5f53a6fc /epan/proto.c
parent670120c481527e82465c19ceb353da8038d9ae85 (diff)
downloadwireshark-21a422463ef37e09bffb6dafbc9e16543e38d151.tar.gz
If WIRESHARK_ABORT_ON_DISSECTOR_BUG is set (in the environment) and we put more
than MAX_TREE_ITEMS in the tree, abort() out rather than throwing an exception. svn path=/trunk/; revision=41009
Diffstat (limited to 'epan/proto.c')
-rw-r--r--epan/proto.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/epan/proto.c b/epan/proto.c
index 7c3a2148c4..777e08c224 100644
--- a/epan/proto.c
+++ b/epan/proto.c
@@ -107,6 +107,8 @@ wrs_count_bitshift(const guint32 bitmask)
return(NULL); \
PTREE_DATA(tree)->count++; \
if (PTREE_DATA(tree)->count > MAX_TREE_ITEMS) { \
+ if (getenv("WIRESHARK_ABORT_ON_DISSECTOR_BUG") != NULL) \
+ abort(); \
/* Let the exception handler add items to the tree */ \
PTREE_DATA(tree)->count = 0; \
THROW_MESSAGE(DissectorError, \