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
cd466606
Commit
cd466606
authored
14 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
change to behavior for issue 3303679 and cleanup of short names
parent
00ed3193
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tsk3/fs/fatfs_meta.c
+7
-10
7 additions, 10 deletions
tsk3/fs/fatfs_meta.c
with
7 additions
and
10 deletions
tsk3/fs/fatfs_meta.c
+
7
−
10
View file @
cd466606
...
@@ -263,7 +263,6 @@ attr2mode(uint16_t attr)
...
@@ -263,7 +263,6 @@ attr2mode(uint16_t attr)
* @param sect Sector address where directory entry is from -- used
* @param sect Sector address where directory entry is from -- used
* to determine allocation status.
* to determine allocation status.
* @param inum Address of the inode.
* @param inum Address of the inode.
* @param a_isInUnalloc 1 if the file is located in unallocated space and should get more cleanup
*
*
* @returns 1 on error and 0 on success. Errors should only occur for
* @returns 1 on error and 0 on success. Errors should only occur for
* Unicode conversion problems and when this occurs the name will be
* Unicode conversion problems and when this occurs the name will be
...
@@ -272,7 +271,7 @@ attr2mode(uint16_t attr)
...
@@ -272,7 +271,7 @@ attr2mode(uint16_t attr)
*/
*/
static
TSK_RETVAL_ENUM
static
TSK_RETVAL_ENUM
fatfs_dinode_copy
(
FATFS_INFO
*
fatfs
,
TSK_FS_META
*
fs_meta
,
fatfs_dinode_copy
(
FATFS_INFO
*
fatfs
,
TSK_FS_META
*
fs_meta
,
fatfs_dentry
*
in
,
TSK_DADDR_T
sect
,
TSK_INUM_T
inum
,
uint8_t
a_isInUnalloc
)
fatfs_dentry
*
in
,
TSK_DADDR_T
sect
,
TSK_INUM_T
inum
)
{
{
int
retval
;
int
retval
;
int
i
;
int
i
;
...
@@ -503,15 +502,13 @@ fatfs_dinode_copy(FATFS_INFO * fatfs, TSK_FS_META * fs_meta,
...
@@ -503,15 +502,13 @@ fatfs_dinode_copy(FATFS_INFO * fatfs, TSK_FS_META * fs_meta,
}
}
fs_meta
->
name2
->
name
[
i
]
=
'\0'
;
fs_meta
->
name2
->
name
[
i
]
=
'\0'
;
/*
if in unalloc space, then
clean up non-ASCII because we are
/* clean up non-ASCII because we are
* copying it into a buffer that is supposed to be UTF-8 and
* copying it into a buffer that is supposed to be UTF-8 and
* we don't know what encoding it is actually in or if it is
* we don't know what encoding it is actually in or if it is
* simply junk. */
* simply junk. */
if
(
a_isInUnalloc
)
{
for
(
i
=
0
;
fs_meta
->
name2
->
name
[
i
]
!=
'\0'
;
i
++
)
{
for
(
i
=
0
;
fs_meta
->
name2
->
name
[
i
]
!=
'\0'
;
i
++
)
{
if
((
unsigned
char
)(
fs_meta
->
name2
->
name
[
i
])
>
0x7e
)
{
if
(
fs_meta
->
name2
->
name
[
i
]
>
0x7e
)
{
fs_meta
->
name2
->
name
[
i
]
=
'^'
;
fs_meta
->
name2
->
name
[
i
]
=
'^'
;
}
}
}
}
}
}
}
...
@@ -1457,7 +1454,7 @@ fatfs_inode_walk(TSK_FS_INFO * fs, TSK_INUM_T start_inum,
...
@@ -1457,7 +1454,7 @@ fatfs_inode_walk(TSK_FS_INFO * fs, TSK_INUM_T start_inum,
if
((
retval2
=
if
((
retval2
=
fatfs_dinode_copy
(
fatfs
,
fs_file
->
meta
,
dep
,
sect
,
fatfs_dinode_copy
(
fatfs
,
fs_file
->
meta
,
dep
,
sect
,
inum
,
!
isInDir
))
!=
TSK_OK
)
{
inum
))
!=
TSK_OK
)
{
/* Ignore this error and continue */
/* Ignore this error and continue */
if
(
retval2
==
TSK_COR
)
{
if
(
retval2
==
TSK_COR
)
{
if
(
tsk_verbose
)
if
(
tsk_verbose
)
...
@@ -1664,7 +1661,7 @@ fatfs_inode_lookup(TSK_FS_INFO * fs, TSK_FS_FILE * a_fs_file,
...
@@ -1664,7 +1661,7 @@ fatfs_inode_lookup(TSK_FS_INFO * fs, TSK_FS_FILE * a_fs_file,
if
(
fatfs_isdentry
(
fatfs
,
&
dep
,
1
))
{
if
(
fatfs_isdentry
(
fatfs
,
&
dep
,
1
))
{
if
((
retval
=
if
((
retval
=
fatfs_dinode_copy
(
fatfs
,
a_fs_file
->
meta
,
&
dep
,
sect
,
fatfs_dinode_copy
(
fatfs
,
a_fs_file
->
meta
,
&
dep
,
sect
,
inum
,
0
))
!=
TSK_OK
)
{
inum
))
!=
TSK_OK
)
{
/* If there was a unicode conversion error,
/* If there was a unicode conversion error,
* then still return the inode */
* then still return the inode */
if
(
retval
==
TSK_ERR
)
{
if
(
retval
==
TSK_ERR
)
{
...
...
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