mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Merge pull request #7008 from markmckinnon/7649-ArrayIndexOutOfBoundsException-in-Recent-Activity
7649-ArrayIndexOutOfBoundsException-in-Recent-Activity
This commit is contained in:
commit
814f8b09d4
@ -1434,21 +1434,23 @@ class ExtractRegistry extends Extract {
|
||||
&& !line.contains(("Recent File List"))) {
|
||||
// Split line on "> " which is the record delimiter between position and file
|
||||
String tokens[] = line.split("> ");
|
||||
String fileName = tokens[1];
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
||||
try{
|
||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||
if (bba != null) {
|
||||
bbartifacts.add(bba);
|
||||
bba = createAssociatedArtifact(FilenameUtils.normalize(fileName, true), bba);
|
||||
if (tokens.length > 1) {
|
||||
String fileName = tokens[1];
|
||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||
attributes.add(new BlackboardAttribute(TSK_COMMENT, getName(), comment));
|
||||
try{
|
||||
BlackboardArtifact bba = createArtifactWithAttributes(ARTIFACT_TYPE.TSK_RECENT_OBJECT, regFile, attributes);
|
||||
if (bba != null) {
|
||||
bbartifacts.add(bba);
|
||||
bba = createAssociatedArtifact(FilenameUtils.normalize(fileName, true), bba);
|
||||
if (bba != null) {
|
||||
bbartifacts.add(bba);
|
||||
}
|
||||
}
|
||||
} catch(TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Failed to create TSK_RECENT_OBJECT artifact for file %d", regFile.getId()), ex);
|
||||
}
|
||||
} catch(TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, String.format("Failed to create TSK_RECENT_OBJECT artifact for file %d", regFile.getId()), ex);
|
||||
}
|
||||
line = reader.readLine();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user