Skip to content
Snippets Groups Projects
Commit 111ba769 authored by Brian Carrier's avatar Brian Carrier
Browse files

Make max depth smaller for #1859 and #2349

parent b9c38b87
No related branches found
No related tags found
No related merge requests found
......@@ -927,8 +927,10 @@ tsk_fs_dir_internal_walk(TSK_FS_INFO * a_fs, TSK_INUM_T a_addr,
return 1;
}
// 256 is an arbitrary chosen value.
if (recursion_depth > 256) {
// 128 is a somewhat arbitrary value.
// https://github.com/sleuthkit/sleuthkit/issues/1859 identified
// an overflow with 240 levels of recursion
if (recursion_depth > 128) {
tsk_error_set_errno(TSK_ERR_FS_ARG);
tsk_error_set_errstr
("tsk_fs_dir_internal_walk: recursion depth exceeds maximum (%d)", recursion_depth);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment