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
f3e42136
Unverified
Commit
f3e42136
authored
1 year ago
by
Jayaram Sreevalsan
Committed by
GitHub
1 year ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #2869 from gdicristofaro/CT-7342_addImageNoPath
CT-7342 read no bytes when image path is missing
parents
e2a6c99d
d892c762
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
+7
-0
7 additions, 0 deletions
bindings/java/src/org/sleuthkit/datamodel/FsContent.java
with
12 additions
and
0 deletions
bindings/java/src/org/sleuthkit/datamodel/FileSystem.java
+
5
−
0
View file @
f3e42136
...
@@ -19,6 +19,7 @@
...
@@ -19,6 +19,7 @@
package
org.sleuthkit.datamodel
;
package
org.sleuthkit.datamodel
;
import
java.util.List
;
import
java.util.List
;
import
org.apache.commons.lang3.ArrayUtils
;
/**
/**
* Represents a file system object stored in tsk_fs_info table FileSystem has a
* Represents a file system object stored in tsk_fs_info table FileSystem has a
...
@@ -69,6 +70,10 @@ public void close() {
...
@@ -69,6 +70,10 @@ public void close() {
@Override
@Override
public
int
read
(
byte
[]
buf
,
long
offset
,
long
len
)
throws
TskCoreException
{
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
);
return
SleuthkitJNI
.
readFs
(
getFileSystemHandle
(),
buf
,
offset
,
len
);
}
}
...
...
This diff is collapsed.
Click to expand it.
bindings/java/src/org/sleuthkit/datamodel/FsContent.java
+
7
−
0
View file @
f3e42136
...
@@ -23,6 +23,7 @@
...
@@ -23,6 +23,7 @@
import
java.util.List
;
import
java.util.List
;
import
java.util.logging.Level
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
java.util.logging.Logger
;
import
org.apache.commons.lang3.ArrayUtils
;
import
org.sleuthkit.datamodel.TskData.FileKnown
;
import
org.sleuthkit.datamodel.TskData.FileKnown
;
import
org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM
;
import
org.sleuthkit.datamodel.TskData.TSK_DB_FILES_TYPE_ENUM
;
import
org.sleuthkit.datamodel.TskData.TSK_FS_ATTR_TYPE_ENUM
;
import
org.sleuthkit.datamodel.TskData.TSK_FS_ATTR_TYPE_ENUM
;
...
@@ -183,6 +184,12 @@ protected synchronized int readInt(byte[] buf, long offset, long len) throws Tsk
...
@@ -183,6 +184,12 @@ protected synchronized int readInt(byte[] buf, long offset, long len) throws Tsk
//special case for 0-size file
//special case for 0-size file
return
0
;
return
0
;
}
}
Content
dataSource
=
getDataSource
();
if
(
dataSource
instanceof
Image
&&
ArrayUtils
.
isEmpty
(((
Image
)
dataSource
).
getPaths
()))
{
return
0
;
}
loadFileHandle
();
loadFileHandle
();
return
SleuthkitJNI
.
readFile
(
fileHandle
,
buf
,
offset
,
len
);
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