forked from I2P_Developers/i2p.i2p
Streaming: Prevent AIOOBE when verifying large signed packets
(prep for PQ)
This commit is contained in:
@ -792,7 +792,7 @@ class Packet {
|
|||||||
|
|
||||||
int size = writtenSize();
|
int size = writtenSize();
|
||||||
|
|
||||||
if (buffer == null)
|
if (buffer == null || size > buffer.length)
|
||||||
buffer = new byte[size];
|
buffer = new byte[size];
|
||||||
if (isFlagSet(FLAG_SIGNATURE_OFFLINE)) {
|
if (isFlagSet(FLAG_SIGNATURE_OFFLINE)) {
|
||||||
if (_transientExpires < ctx.clock().now()) {
|
if (_transientExpires < ctx.clock().now()) {
|
||||||
|
Reference in New Issue
Block a user