Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
Autopsy
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
Autopsy
Commits
df8f1abc
Commit
df8f1abc
authored
11 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
changed image size sanity checks a bit. moved to Image
parent
319ace0c
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java
+3
-2
3 additions, 2 deletions
...t/autopsy/casemodule/AddImageWizardIngestConfigPanel.java
Core/src/org/sleuthkit/autopsy/casemodule/Case.java
+1
-53
1 addition, 53 deletions
Core/src/org/sleuthkit/autopsy/casemodule/Case.java
with
4 additions
and
55 deletions
Core/src/org/sleuthkit/autopsy/casemodule/AddImageWizardIngestConfigPanel.java
+
3
−
2
View file @
df8f1abc
...
@@ -564,9 +564,10 @@ private void commitImage(WizardDescriptor settings) throws Exception {
...
@@ -564,9 +564,10 @@ private void commitImage(WizardDescriptor settings) throws Exception {
Image
newImage
=
Case
.
getCurrentCase
().
addImage
(
contentPath
,
imageId
,
timezone
);
Image
newImage
=
Case
.
getCurrentCase
().
addImage
(
contentPath
,
imageId
,
timezone
);
newImage
.
getSsize
();
newImage
.
getSsize
();
String
verificationErrors
=
Cas
e
.
verifyImageSize
(
newImage
);
String
verificationErrors
=
newImag
e
.
verifyImageSize
();
if
(
verificationErrors
!=
null
)
{
if
(
verificationErrors
.
equals
(
""
)
==
false
)
{
//data error (non-critical)
//data error (non-critical)
// @@@ Aren't we potentially overwriting existing errors...
progressPanel
.
setErrors
(
verificationErrors
,
false
);
progressPanel
.
setErrors
(
verificationErrors
,
false
);
}
}
...
...
This diff is collapsed.
Click to expand it.
Core/src/org/sleuthkit/autopsy/casemodule/Case.java
+
1
−
53
View file @
df8f1abc
...
@@ -109,60 +109,8 @@ public class Case implements SleuthkitCase.ErrorObserver {
...
@@ -109,60 +109,8 @@ public class Case implements SleuthkitCase.ErrorObserver {
// pcs is initialized in CaseListener constructor
// pcs is initialized in CaseListener constructor
private
static
final
PropertyChangeSupport
pcs
=
new
PropertyChangeSupport
(
Case
.
class
);
private
static
final
PropertyChangeSupport
pcs
=
new
PropertyChangeSupport
(
Case
.
class
);
/**
*
* @param newImage the value of newImage
*
* @throws TskCoreException
*/
public
static
String
verifyImageSize
(
Image
newImage
)
{
Logger
logger1
=
Logger
.
getLogger
(
"verifyImageSizes"
);
String
errorString
=
""
;
try
{
List
<
VolumeSystem
>
volumeSystems
=
newImage
.
getVolumeSystems
();
logger1
.
log
(
Level
.
INFO
,
"found volume systems: "
+
volumeSystems
.
size
());
for
(
VolumeSystem
vs
:
volumeSystems
)
{
List
<
Volume
>
volumes
=
vs
.
getVolumes
();
logger1
.
log
(
Level
.
INFO
,
"found volumes: "
+
volumes
.
size
());
for
(
Volume
v
:
volumes
)
{
byte
[]
buf
=
new
byte
[
100
];
try
{
int
readBytes
=
newImage
.
read
(
buf
,
v
.
getStart
()
+
v
.
getLength
()
-
100
,
100
);
if
(
readBytes
<
0
)
{
logger1
.
warning
(
"problem reading volume: Not as much data as expected"
);
errorString
=
"\n problem reading volume: Not as much data as expected"
;
}
}
catch
(
TskCoreException
ex
)
{
logger1
.
warning
(
"error reading volume: Not as much data as expected."
+
ex
.
getLocalizedMessage
());
errorString
=
"\n error reading volume: Not as much data as expected."
;
}
}
}
List
<
FileSystem
>
fileSystems
=
newImage
.
getFileSystems
();
logger1
.
log
(
Level
.
INFO
,
"found file systems: "
+
fileSystems
.
size
());
for
(
FileSystem
fs
:
fileSystems
)
{
long
block_size
=
fs
.
getBlock_size
();
byte
[]
buf
=
new
byte
[(
int
)
block_size
];
try
{
int
readBytes
=
newImage
.
read
(
buf
,
fs
.
getImageOffset
()
+
fs
.
getSize
()
-
block_size
,
block_size
);
if
(
readBytes
<
0
)
{
logger1
.
warning
(
"problem reading file system: Not as much data as expected."
);
errorString
=
"\n problem reading file system: Not as much data as expected."
;
}
}
catch
(
TskCoreException
ex
)
{
logger1
.
warning
(
"error reading file system: Not as much data as expected."
+
ex
.
getLocalizedMessage
());
errorString
=
"\n error reading file system: Not as much data as expected."
;
}
}
}
catch
(
TskCoreException
ex
)
{
errorString
=
"Error reading volume or filesystem. Could not verify image size"
;
logger1
.
warning
(
errorString
+
ex
);
}
return
errorString
;
}
private
String
name
;
private
String
name
;
private
String
number
;
private
String
number
;
private
String
examiner
;
private
String
examiner
;
...
...
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