mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Merge pull request #1556 from robertolarcher/develop
Email Parser: NegativeArraySizeException patch
This commit is contained in:
commit
350fc355c0
@ -254,10 +254,16 @@ class PstParser {
|
||||
int bufferSize = 8176;
|
||||
byte[] buffer = new byte[bufferSize];
|
||||
int count = attachmentStream.read(buffer);
|
||||
|
||||
if(count == -1) {
|
||||
throw new IOException("attachmentStream invalid (read() fails). File "+attach.getLongFilename()+ " skipped");
|
||||
}
|
||||
|
||||
while (count == bufferSize) {
|
||||
out.write(buffer);
|
||||
count = attachmentStream.read(buffer);
|
||||
}
|
||||
|
||||
byte[] endBuffer = new byte[count];
|
||||
System.arraycopy(buffer, 0, endBuffer, 0, count);
|
||||
out.write(endBuffer);
|
||||
|
Loading…
x
Reference in New Issue
Block a user