mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-13 08:26:15 +00:00
Update ExtractRegistry.java
Check length of Tokens after split, if they are not greater than 2 then skip trying to parse the token.
This commit is contained in:
parent
eece6bd2b4
commit
ae0d95b089
@ -1434,6 +1434,7 @@ class ExtractRegistry extends Extract {
|
|||||||
&& !line.contains(("Recent File List"))) {
|
&& !line.contains(("Recent File List"))) {
|
||||||
// Split line on "> " which is the record delimiter between position and file
|
// Split line on "> " which is the record delimiter between position and file
|
||||||
String tokens[] = line.split("> ");
|
String tokens[] = line.split("> ");
|
||||||
|
if (tokens.length > 1) {
|
||||||
String fileName = tokens[1];
|
String fileName = tokens[1];
|
||||||
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
Collection<BlackboardAttribute> attributes = new ArrayList<>();
|
||||||
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
attributes.add(new BlackboardAttribute(TSK_PATH, getName(), fileName));
|
||||||
@ -1450,6 +1451,7 @@ class ExtractRegistry extends Extract {
|
|||||||
} catch(TskCoreException ex) {
|
} catch(TskCoreException ex) {
|
||||||
logger.log(Level.SEVERE, String.format("Failed to create TSK_RECENT_OBJECT artifact for file %d", regFile.getId()), ex);
|
logger.log(Level.SEVERE, String.format("Failed to create TSK_RECENT_OBJECT artifact for file %d", regFile.getId()), ex);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
line = reader.readLine();
|
line = reader.readLine();
|
||||||
}
|
}
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user