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
7919d050
Commit
7919d050
authored
1 year ago
by
Greg DiCristofaro
Browse files
Options
Downloads
Patches
Plain Diff
read no bytes when image path is missing
parent
e2a6c99d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bindings/java/src/org/sleuthkit/datamodel/FileSystem.java
+5
-0
5 additions, 0 deletions
bindings/java/src/org/sleuthkit/datamodel/FileSystem.java
bindings/java/src/org/sleuthkit/datamodel/FsContent.java
+6
-0
6 additions, 0 deletions
bindings/java/src/org/sleuthkit/datamodel/FsContent.java
with
11 additions
and
0 deletions
bindings/java/src/org/sleuthkit/datamodel/FileSystem.java
+
5
−
0
View file @
7919d050
...
...
@@ -19,6 +19,7 @@
package
org.sleuthkit.datamodel
;
import
java.util.List
;
import
org.apache.commons.lang3.ArrayUtils
;
/**
* Represents a file system object stored in tsk_fs_info table FileSystem has a
...
...
@@ -69,6 +70,10 @@ public void close() {
@Override
public
int
read
(
byte
[]
buf
,
long
offset
,
long
len
)
throws
TskCoreException
{
Content
dataSource
=
getDataSource
();
if
(
dataSource
instanceof
Image
&&
ArrayUtils
.
isEmpty
(((
Image
)
dataSource
).
getPaths
()))
{
return
0
;
}
return
SleuthkitJNI
.
readFs
(
getFileSystemHandle
(),
buf
,
offset
,
len
);
}
...
...
This diff is collapsed.
Click to expand it.
bindings/java/src/org/sleuthkit/datamodel/FsContent.java
+
6
−
0
View file @
7919d050
...
...
@@ -183,6 +183,12 @@ protected synchronized int readInt(byte[] buf, long offset, long len) throws Tsk
//special case for 0-size file
return
0
;
}
Content
dataSource
=
getDataSource
();
if
(
dataSource
instanceof
Image
&&
((
Image
)
dataSource
).
getPaths
()
==
null
||
((
Image
)
dataSource
).
getPaths
().
length
==
0
)
{
return
0
;
}
loadFileHandle
();
return
SleuthkitJNI
.
readFile
(
fileHandle
,
buf
,
offset
,
len
);
}
...
...
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