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
337fd1da
Commit
337fd1da
authored
16 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
fix for 2777633 re: FAT creation time resolution
parent
973e2921
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.txt
+3
-0
3 additions, 0 deletions
CHANGES.txt
tsk3/fs/fatfs_meta.c
+9
-4
9 additions, 4 deletions
tsk3/fs/fatfs_meta.c
tsk3/fs/tsk_fatfs.h
+1
-1
1 addition, 1 deletion
tsk3/fs/tsk_fatfs.h
with
13 additions
and
5 deletions
CHANGES.txt
+
3
−
0
View file @
337fd1da
...
...
@@ -74,6 +74,9 @@ when reading the raw character device. patch by Rob Joyce.
4/21/09: Bug Fix. Fixed issue 2778170 re: incorrect read size on resident
attributes. Patch by Jamie Butler.
4/21/09: Bug Fix. Fixed issue 2777633 re: missing second resolution on FAT
creation times. Reported by Eoghan Casey.
---------------- VERSION 3.0.0 --------------
0/00/00: Update: Many, many, many API changes.
...
...
This diff is collapsed.
Click to expand it.
tsk3/fs/fatfs_meta.c
+
9
−
4
View file @
337fd1da
...
...
@@ -95,7 +95,7 @@ is_83_name(fatfs_dentry * de)
**
*/
static
time_t
dos2unixtime
(
uint16_t
date
,
uint16_t
time
)
dos2unixtime
(
uint16_t
date
,
uint16_t
time
,
uint8_t
timetens
)
{
struct
tm
tm1
;
time_t
ret
;
...
...
@@ -108,6 +108,9 @@ dos2unixtime(uint16_t date, uint16_t time)
tm1
.
tm_sec
=
((
time
&
FATFS_SEC_MASK
)
>>
FATFS_SEC_SHIFT
)
*
2
;
if
((
tm1
.
tm_sec
<
0
)
||
(
tm1
.
tm_sec
>
60
))
tm1
.
tm_sec
=
0
;
// the ctimetens value has a range of 0 to 199
if
(
timetens
>
100
)
tm1
.
tm_sec
++
;
tm1
.
tm_min
=
((
time
&
FATFS_MIN_MASK
)
>>
FATFS_MIN_SHIFT
);
if
((
tm1
.
tm_min
<
0
)
||
(
tm1
.
tm_min
>
59
))
...
...
@@ -273,13 +276,13 @@ fatfs_dinode_copy(FATFS_INFO * fatfs, TSK_FS_META * fs_meta,
if
(
FATFS_ISDATE
(
tsk_getu16
(
fs
->
endian
,
in
->
wdate
)))
fs_meta
->
mtime
=
dos2unixtime
(
tsk_getu16
(
fs
->
endian
,
in
->
wdate
),
tsk_getu16
(
fs
->
endian
,
in
->
wtime
));
tsk_getu16
(
fs
->
endian
,
in
->
wtime
)
,
0
);
else
fs_meta
->
mtime
=
0
;
if
(
FATFS_ISDATE
(
tsk_getu16
(
fs
->
endian
,
in
->
adate
)))
fs_meta
->
atime
=
dos2unixtime
(
tsk_getu16
(
fs
->
endian
,
in
->
adate
),
0
);
dos2unixtime
(
tsk_getu16
(
fs
->
endian
,
in
->
adate
),
0
,
0
);
else
fs_meta
->
atime
=
0
;
...
...
@@ -291,7 +294,7 @@ fatfs_dinode_copy(FATFS_INFO * fatfs, TSK_FS_META * fs_meta,
if
(
FATFS_ISDATE
(
tsk_getu16
(
fs
->
endian
,
in
->
cdate
)))
fs_meta
->
crtime
=
dos2unixtime
(
tsk_getu16
(
fs
->
endian
,
in
->
cdate
),
tsk_getu16
(
fs
->
endian
,
in
->
ctime
));
tsk_getu16
(
fs
->
endian
,
in
->
ctime
)
,
in
->
ctimeten
);
else
fs_meta
->
crtime
=
0
;
...
...
@@ -753,6 +756,8 @@ fatfs_isdentry(FATFS_INFO * fatfs, fatfs_dentry * de)
else
if
((
tsk_getu16
(
fs
->
endian
,
de
->
cdate
)
!=
0
)
&&
(
FATFS_ISDATE
(
tsk_getu16
(
fs
->
endian
,
de
->
cdate
))
==
0
))
return
0
;
else
if
(
de
->
ctimeten
>
200
)
return
0
;
else
if
((
tsk_getu16
(
fs
->
endian
,
de
->
adate
)
!=
0
)
&&
(
FATFS_ISDATE
(
tsk_getu16
(
fs
->
endian
,
de
->
adate
))
==
0
))
return
0
;
...
...
This diff is collapsed.
Click to expand it.
tsk3/fs/tsk_fatfs.h
+
1
−
1
View file @
337fd1da
...
...
@@ -176,7 +176,7 @@ extern "C" {
uint8_t
ext
[
3
];
uint8_t
attrib
;
uint8_t
lowercase
;
uint8_t
ctimeten
;
/* create times */
uint8_t
ctimeten
;
/* create times
(ctimeten is 0-199)
*/
uint8_t
ctime
[
2
];
uint8_t
cdate
[
2
];
uint8_t
adate
[
2
];
/* access time */
...
...
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