mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-01 22:56:33 +02:00
Hard limit uncompressed output
This commit is contained in:
@@ -3421,6 +3421,8 @@ public class MessageHelper {
|
||||
byte[] buffer = new byte[Helper.BUFFER_SIZE];
|
||||
for (int len = gzip.read(buffer); len != -1; len = gzip.read(buffer)) {
|
||||
size += len;
|
||||
if (size > MAX_UNZIP_SIZE)
|
||||
throw new IOException("File too large");
|
||||
os.write(buffer, 0, len);
|
||||
|
||||
if (total > 0) {
|
||||
@@ -3503,6 +3505,8 @@ public class MessageHelper {
|
||||
byte[] buffer = new byte[Helper.BUFFER_SIZE];
|
||||
for (int len = ais.read(buffer); len != -1; len = ais.read(buffer)) {
|
||||
size += len;
|
||||
if (size > MAX_UNZIP_SIZE)
|
||||
throw new IOException("File too large");
|
||||
os.write(buffer, 0, len);
|
||||
|
||||
if (total > 0) {
|
||||
|
||||
Reference in New Issue
Block a user