mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
Fix NPE when page size is zero
This commit is contained in:
parent
510b235c2d
commit
f57b938a29
@ -89,7 +89,7 @@ final class BinaryCookieReader implements Iterable<Cookie> {
|
|||||||
throw new IOException(cookieFile.getName() + " is not a cookie file"); //NON-NLS
|
throw new IOException(cookieFile.getName() + " is not a cookie file"); //NON-NLS
|
||||||
}
|
}
|
||||||
|
|
||||||
int[] sizeArray = null;
|
int[] sizeArray;
|
||||||
int pageCount = dataStream.readInt();
|
int pageCount = dataStream.readInt();
|
||||||
if (pageCount != 0) {
|
if (pageCount != 0) {
|
||||||
sizeArray = new int[pageCount];
|
sizeArray = new int[pageCount];
|
||||||
@ -97,8 +97,9 @@ final class BinaryCookieReader implements Iterable<Cookie> {
|
|||||||
for (int cnt = 0; cnt < pageCount; cnt++) {
|
for (int cnt = 0; cnt < pageCount; cnt++) {
|
||||||
sizeArray[cnt] = dataStream.readInt();
|
sizeArray[cnt] = dataStream.readInt();
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
LOG.log(Level.INFO, "No cookies found in {0}", cookieFile.getName()); //NON-NLS
|
LOG.log(Level.INFO, "No cookies found in {0}", cookieFile.getName()); //NON-NLS
|
||||||
|
sizeArray = new int[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
reader = new BinaryCookieReader(cookieFile, sizeArray);
|
reader = new BinaryCookieReader(cookieFile, sizeArray);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user