On Thu, 12 Nov 2020 16:34:30 GMT, Anthony Scarpino <ascarp...@openjdk.org> wrote:
>> 8253821: Improve ByteBuffer performance with GCM > > Anthony Scarpino has updated the pull request incrementally with one > additional commit since the last revision: > > Code review comment update > Major change to test to detect corruption with incremental buffers test src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 822: > 820: if (len > dst.remaining()) { > 821: throw new ShortBufferException("Output buffer too small"); > 822: } How is this different from the check at line 775-778 at the beginning of this method? src/java.base/share/classes/com/sun/crypto/provider/GaloisCounterMode.java line 818: > 816: // do this check here can also catch the potential integer > overflow > 817: // scenario for the subsequent output buffer capacity check. > 818: checkDataLength(0, len); Perhaps this can be moved up to the beginning of this method just like the dst size check? ------------- PR: https://git.openjdk.java.net/jdk/pull/411