aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs.c
diff options
context:
space:
mode:
authorJohn Thacker <johnthacker@gmail.com>2020-10-22 09:18:18 -0400
committerWireshark GitLab Utility <gerald+gitlab-utility@wireshark.org>2020-10-23 04:18:36 +0000
commit524a28c4b1c04236857c9b7de33d9e1b9b0d8451 (patch)
tree3d54b5d125f974fe8e8281e34ea18a338d89b5c8 /epan/prefs.c
parent56e19bec49c23480fcde110a7f2d0b503b285805 (diff)
QT/CLI: Move max tree items and depth to prefs
Move the maximum number of tree items and maximum tree depth to preferences instead of hardcoded values. Refer to issue #12584 for an example VNC capture where real data exceeds the current limit.
Diffstat (limited to 'epan/prefs.c')
-rw-r--r--epan/prefs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/epan/prefs.c b/epan/prefs.c
index e34124431c..7a378592be 100644
--- a/epan/prefs.c
+++ b/epan/prefs.c
@@ -3343,6 +3343,16 @@ prefs_register_modules(void)
"The maximum number of objects that can be exported",
10,
&prefs.gui_max_export_objects);
+ prefs_register_uint_preference(gui_module, "max_tree_items",
+ "Maximum number of tree items",
+ "The maximum number of items that can be added to the dissection tree (Increase with caution)",
+ 10,
+ &prefs.gui_max_tree_items);
+ prefs_register_uint_preference(gui_module, "max_tree_depth",
+ "Maximum tree depth",
+ "The maximum depth of the dissection tree (Increase with caution)",
+ 10,
+ &prefs.gui_max_tree_depth);
/* User Interface : Layout */
@@ -4139,6 +4149,8 @@ pre_init_prefs(void)
prefs.gui_qt_show_selected_packet = FALSE;
prefs.gui_qt_show_file_load_time = FALSE;
prefs.gui_max_export_objects = 1000;
+ prefs.gui_max_tree_items = 1 * 1000 * 1000;
+ prefs.gui_max_tree_depth = 5 * 100;
if (prefs.col_list) {
free_col_info(prefs.col_list);