Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Better check for unfinished decompression
Dieser Commit ist enthalten in:
Ursprung
b599e7b45c
Commit
c140599a53
@ -49,9 +49,9 @@ public class JavaVelocityCompressor implements VelocityCompressor {
|
|||||||
destination.writerIndex(destination.writerIndex() + produced);
|
destination.writerIndex(destination.writerIndex() + produced);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (inflater.getBytesWritten() != uncompressedSize) {
|
if (!inflater.finished()) {
|
||||||
throw new DataFormatException("Did not write the exact expected number of"
|
throw new DataFormatException("Received a deflate stream that was too large, wanted "
|
||||||
+ " uncompressed bytes, expected " + uncompressedSize);
|
+ uncompressedSize);
|
||||||
}
|
}
|
||||||
source.readerIndex(origIdx + inflater.getTotalIn());
|
source.readerIndex(origIdx + inflater.getTotalIn());
|
||||||
} finally {
|
} finally {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren