diff --git a/cache/src/main/java/dev/openrs2/cache/Js5Compression.kt b/cache/src/main/java/dev/openrs2/cache/Js5Compression.kt index 206018f4..c0bd93e0 100644 --- a/cache/src/main/java/dev/openrs2/cache/Js5Compression.kt +++ b/cache/src/main/java/dev/openrs2/cache/Js5Compression.kt @@ -152,6 +152,10 @@ public object Js5Compression { } remaining -= n } + + if (inputStream.read() != -1) { + throw IOException("Uncompressed data overflow") + } } return output.retain()