On Sat, 14 Nov 2020 00:33:35 GMT, Anthony Scarpino <ascarp...@openjdk.org> wrote:
>> 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? > > You don't know what 'len', which includes ibuffer data, until this point in > the code. Well, didn't you already calcuate the 'len' value in the beginning of the copied-from-GCTR RuntimeException check? ------------- PR: https://git.openjdk.java.net/jdk/pull/411