Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
eb6e4318
Commit
eb6e4318
authored
6 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
fix null pointer issues
parent
705727ac
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsk/fs/ntfs_dent.cpp
+6
-20
6 additions, 20 deletions
tsk/fs/ntfs_dent.cpp
with
6 additions
and
20 deletions
tsk/fs/ntfs_dent.cpp
+
6
−
20
View file @
eb6e4318
...
...
@@ -747,7 +747,7 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir,
char
*
idxalloc
;
ntfs_idxentry
*
idxe
;
ntfs_idxroot
*
idxroot
;
ntfs_idxelist
*
idxelist
;
ntfs_idxelist
*
idxelist
=
NULL
;
ntfs_idxrec
*
idxrec_p
,
*
idxrec
;
TSK_OFF_T
idxalloc_len
;
TSK_FS_LOAD_FILE
load_file
;
...
...
@@ -851,7 +851,6 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir,
return
TSK_COR
;
}
}
/*
...
...
@@ -983,8 +982,8 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir,
* all of the entries
*/
if
(
!
fs_attr_idx
)
{
if
(
tsk_getu32
(
a_fs
->
endian
,
idxelist
->
flags
)
&
NTFS_IDXELIST_CHILD
)
{
if
((
idxelist
)
&&
(
tsk_getu32
(
a_fs
->
endian
,
idxelist
->
flags
)
&
NTFS_IDXELIST_CHILD
)
)
{
tsk_error_reset
();
tsk_error_set_errno
(
TSK_ERR_FS_INODE_COR
);
tsk_error_set_errstr
...
...
@@ -1003,22 +1002,9 @@ ntfs_dir_open_meta(TSK_FS_INFO * a_fs, TSK_FS_DIR ** a_fs_dir,
return
TSK_COR
;
}
/* Verify that the attribute type is $FILE_NAME */
if
(
tsk_getu32
(
a_fs
->
endian
,
fs_attr_idx
->
type
)
==
0
)
{
tsk_error_reset
();
tsk_error_set_errno
(
TSK_ERR_FS_INODE_COR
);
tsk_error_set_errstr
(
"dent_walk: Attribute type in index alloc is 0"
);
return
TSK_COR
;
}
else
if
(
tsk_getu32
(
a_fs
->
endian
,
fs_attr_idx
->
type
)
!=
NTFS_ATYPE_FNAME
)
{
tsk_error_reset
();
tsk_error_set_errno
(
TSK_ERR_FS_INODE_COR
);
tsk_error_set_errstr
(
"ERROR: Directory index is sorted by type: %"
PRIu32
".
\n
Only $FNAME is currently supported"
,
tsk_getu32
(
a_fs
->
endian
,
fs_attr_idx
->
type
));
return
TSK_COR
;
}
// NOTE: If there was no IDX_ROOT, then we have not done any validation at this point
// that this index structure is actually about FNAME objects. Sanity checking
// could be added here
/*
* Copy the index allocation run into a big buffer
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment