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
bb012b7c
Commit
bb012b7c
authored
14 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
split image names are stored in local copy
parent
cd466606
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
NEWS.txt
+1
-0
1 addition, 0 deletions
NEWS.txt
tsk3/img/split.c
+35
-4
35 additions, 4 deletions
tsk3/img/split.c
tsk3/img/split.h
+1
-1
1 addition, 1 deletion
tsk3/img/split.h
with
37 additions
and
5 deletions
NEWS.txt
+
1
−
0
View file @
bb012b7c
...
@@ -18,6 +18,7 @@ applied to deleted directories.
...
@@ -18,6 +18,7 @@ applied to deleted directories.
New Features:
New Features:
- 3213888: RAW CD format
- 3213888: RAW CD format
- Auto class accepts TSK_IMG_INFO as argument
- Auto class accepts TSK_IMG_INFO as argument
- Copies of split image file names are stored in TSK so that the caller can free them before TSK_IMG_INFO is freed.
---------------- VERSION 3.2.1 --------------
---------------- VERSION 3.2.1 --------------
Bug Fixes
Bug Fixes
...
...
This diff is collapsed.
Click to expand it.
tsk3/img/split.c
+
35
−
4
View file @
bb012b7c
...
@@ -317,8 +317,16 @@ split_close(TSK_IMG_INFO * img_info)
...
@@ -317,8 +317,16 @@ split_close(TSK_IMG_INFO * img_info)
close
(
split_info
->
cache
[
i
].
fd
);
close
(
split_info
->
cache
[
i
].
fd
);
#endif
#endif
}
}
free
(
split_info
->
max_off
);
for
(
i
=
0
;
i
<
split_info
->
num_img
;
i
++
){
free
(
split_info
->
cptr
);
if
(
split_info
->
images
[
i
])
free
(
split_info
->
images
[
i
]);
}
if
(
split_info
->
max_off
)
free
(
split_info
->
max_off
);
if
(
split_info
->
images
)
free
(
split_info
->
images
);
if
(
split_info
->
cptr
)
free
(
split_info
->
cptr
);
free
(
split_info
);
free
(
split_info
);
}
}
...
@@ -376,9 +384,32 @@ split_open(int num_img, const TSK_TCHAR * const images[],
...
@@ -376,9 +384,32 @@ split_open(int num_img, const TSK_TCHAR * const images[],
return
NULL
;
return
NULL
;
}
}
img_info
->
size
=
0
;
img_info
->
size
=
0
;
split_info
->
num_img
=
num_img
;
split_info
->
num_img
=
num_img
;
split_info
->
images
=
images
;
split_info
->
images
=
(
TSK_TCHAR
**
)
tsk_malloc
(
sizeof
(
TSK_TCHAR
*
)
*
num_img
);
if
(
split_info
->
images
==
NULL
){
free
(
split_info
->
max_off
);
free
(
split_info
->
cptr
);
free
(
split_info
);
return
NULL
;
}
for
(
i
=
0
;
i
<
num_img
;
i
++
){
size_t
len
=
TSTRLEN
(
images
[
i
]);
split_info
->
images
[
i
]
=
(
TSK_TCHAR
*
)
tsk_malloc
(
sizeof
(
TSK_TCHAR
)
*
(
len
+
1
));
if
(
split_info
->
images
==
NULL
){
while
(
i
>
0
){
i
--
;
free
(
split_info
->
images
[
i
]);
}
free
(
split_info
->
images
);
free
(
split_info
->
max_off
);
free
(
split_info
->
cptr
);
free
(
split_info
);
return
NULL
;
}
TSTRNCPY
(
split_info
->
images
[
i
],
images
[
i
],
len
);
}
/* Get size info for each file - we do not open each one because that
/* Get size info for each file - we do not open each one because that
* could cause us to run out of file decsriptors when we only need a few.
* could cause us to run out of file decsriptors when we only need a few.
...
...
This diff is collapsed.
Click to expand it.
tsk3/img/split.h
+
1
−
1
View file @
bb012b7c
...
@@ -38,7 +38,7 @@ extern "C" {
...
@@ -38,7 +38,7 @@ extern "C" {
int
num_img
;
int
num_img
;
// the following are protected by cache_lock in IMG_INFO
// the following are protected by cache_lock in IMG_INFO
const
TSK_TCHAR
*
const
*
images
;
TSK_TCHAR
**
images
;
TSK_OFF_T
*
max_off
;
TSK_OFF_T
*
max_off
;
int
*
cptr
;
/* exists for each image - points to entry in cache */
int
*
cptr
;
/* exists for each image - points to entry in cache */
IMG_SPLIT_CACHE
cache
[
SPLIT_CACHE
];
/* small number of fds for open images */
IMG_SPLIT_CACHE
cache
[
SPLIT_CACHE
];
/* small number of fds for open images */
...
...
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