On Fri, 13 Nov 2020 20:11:45 GMT, Valerie Peng <valer...@openjdk.org> wrote:
>> 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 518: > >> 516: ArrayUtil.nullAndBoundsCheck(out, outOfs, inLen); >> 517: byte[] block = new byte[blockSize]; >> 518: int inLenUsed = constructBlock(ibuffer.toByteArray(), in, >> block); > > constructBlock takes 'in' but not 'inOfs'? Wouldn't the data be taken from > the wrong index? No test catches this, strange? The assumption of this whole block here seems to be that ibuffer would not contain more than a block of buffered data? If that's the case, maybe we can just use 'ibuffer' instead of allocating a local 'block' and copy the data into it every time? ------------- PR: https://git.openjdk.java.net/jdk/pull/411