Streaming: Prevent AIOOBE when verifying large signed packets

(prep for PQ)
This commit is contained in:
zzz
2025-02-25 07:16:08 -05:00
parent a922c1cc6d
commit a80ea64429

View File

@ -792,7 +792,7 @@ class Packet {
int size = writtenSize();
if (buffer == null)
if (buffer == null || size > buffer.length)
buffer = new byte[size];
if (isFlagSet(FLAG_SIGNATURE_OFFLINE)) {
if (_transientExpires < ctx.clock().now()) {