1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-06 02:24:30 +00:00

detect EOF in CacheLocationAnalyzer

This commit is contained in:
Karl Mortensen
2015-03-24 11:36:17 -04:00
parent 7d36100749
commit f575fcddba

View File

@@ -66,7 +66,6 @@ class CacheLocationAnalyzer {
}
private static void findGeoLocationsInFile(File file, AbstractFile f) {
byte[] bytes; // will temporarily hold bytes to be converted into the correct data types
try {
@@ -87,7 +86,9 @@ class CacheLocationAnalyzer {
bytes = new byte[1];
inputStream.read(bytes);
while (new BigInteger(bytes).intValue() != 0) { //pass through non important values until the start of accuracy(around 7-10 bytes)
inputStream.read(bytes);
if (0 > inputStream.read(bytes)) {
break; /// we've passed the end of the file, so stop
}
}
bytes = new byte[3];
inputStream.read(bytes);