Check that we read exactly uncompressedLen bytes

Signed-off-by: Graham <gpe@openrs2.dev>
Graham 4 years ago
parent cdae86aad6
commit 977dd0bd93
  1. 4
      cache/src/main/java/dev/openrs2/cache/Js5Compression.kt

@ -152,6 +152,10 @@ public object Js5Compression {
} }
remaining -= n remaining -= n
} }
if (inputStream.read() != -1) {
throw IOException("Uncompressed data overflow")
}
} }
return output.retain() return output.retain()

Loading…
Cancel
Save