netty5/buffer
Matthew Kavanagh d3a41b8b9a
Avoid integer overflow in ByteBuf.ensureWritable (#10648)
Motivation:

- To make ensureWritable throw IOOBE when maxCapacity is exceeded, even if
the requested new capacity would overflow Integer.MAX_VALUE

Modification:

- AbstractByteBuf.ensureWritable0 is modified to detect when
targetCapacity has wrapped around
- Test added for correct behaviour in AbstractByteBufTest

Result:

- Calls to ensureWritable will always throw IOOBE when maxCapacity is
exceeded (and bounds checking is enabled)
2020-10-12 09:23:32 +02:00
..
src Avoid integer overflow in ByteBuf.ensureWritable (#10648) 2020-10-12 09:23:32 +02:00
pom.xml [maven-release-plugin] prepare for next development iteration 2020-09-08 05:26:25 +00:00