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
6ac3c920
Commit
6ac3c920
authored
5 years ago
by
apriestman
Browse files
Options
Downloads
Patches
Plain Diff
Cleanup
parent
0a24a98a
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/img/raw.c
+1
-3
1 addition, 3 deletions
tsk/img/raw.c
with
1 addition
and
3 deletions
tsk/img/raw.c
+
1
−
3
View file @
6ac3c920
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
#define S_IFDIR __S_IFDIR
#define S_IFDIR __S_IFDIR
#endif
#endif
/**
/**
* \internal
* \internal
* Read from one of the multiple files in a split set of disk images.
* Read from one of the multiple files in a split set of disk images.
...
@@ -123,7 +124,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
...
@@ -123,7 +124,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
#ifdef TSK_WIN32
#ifdef TSK_WIN32
{
{
// Default to the values that were passed in
// Default to the values that were passed in
TSK_OFF_T
offset_to_read
=
rel_offset
;
TSK_OFF_T
offset_to_read
=
rel_offset
;
size_t
len_to_read
=
len
;
size_t
len_to_read
=
len
;
...
@@ -134,7 +134,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
...
@@ -134,7 +134,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
// read some extra data.
// read some extra data.
if
((
offset_to_read
%
raw_info
->
img_info
.
sector_size
!=
0
)
if
((
offset_to_read
%
raw_info
->
img_info
.
sector_size
!=
0
)
&&
(
TSTRNCMP
(
raw_info
->
img_info
.
images
[
idx
],
_TSK_T
(
"
\\\\
.
\\
"
),
4
)
==
0
))
{
&&
(
TSTRNCMP
(
raw_info
->
img_info
.
images
[
idx
],
_TSK_T
(
"
\\\\
.
\\
"
),
4
)
==
0
))
{
//printf("\n#### Adjusting read offset: original 0x%llx\n", offset_to_read);
offset_to_read
=
(
offset_to_read
/
raw_info
->
img_info
.
sector_size
)
*
raw_info
->
img_info
.
sector_size
;
offset_to_read
=
(
offset_to_read
/
raw_info
->
img_info
.
sector_size
)
*
raw_info
->
img_info
.
sector_size
;
len_to_read
+=
raw_info
->
img_info
.
sector_size
;
// this length will already be a multiple of sector size
len_to_read
+=
raw_info
->
img_info
.
sector_size
;
// this length will already be a multiple of sector size
sector_aligned_buf
=
(
char
*
)
tsk_malloc
(
len_to_read
);
sector_aligned_buf
=
(
char
*
)
tsk_malloc
(
len_to_read
);
...
@@ -174,7 +173,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
...
@@ -174,7 +173,6 @@ raw_read_segment(IMG_RAW_INFO * raw_info, int idx, char *buf,
cimg
->
seek_pos
=
offset_to_read
;
cimg
->
seek_pos
=
offset_to_read
;
}
}
//For physical drive when the buffer is larger than remaining data,
//For physical drive when the buffer is larger than remaining data,
// WinAPI ReadFile call returns -1
// WinAPI ReadFile call returns -1
//in this case buffer of exact length must be passed to ReadFile
//in this case buffer of exact length must be passed to ReadFile
...
...
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