On Tue, 11 Aug 2026 22:25:59 GMT, Valerie Peng <[email protected]> wrote:
>> This fixes 2 problematic if-checks inside the NONwithECDSA signature impl of >> SunEC provider. >> >> Thanks in advance for the review~ >> Valerie >> >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Valerie Peng has updated the pull request incrementally with one additional > commit since the last revision: > > removed unused import src/java.base/share/classes/sun/security/ec/ECDSASignature.java line 160: > 158: protected void engineUpdate(byte[] b, int off, int len) > 159: throws SignatureException { > 160: if (len > precomputedDigest.length - offset) { Do you need to add a comment that when last `update` already overflowed then `precomputedDigest.length - offset` is negative and the check always succeeds? It took me some time to confirm this. test/jdk/sun/security/ec/NONEwithECDSAOffsetTest.java line 39: > 37: * @test > 38: * @bug 8385672 > 39: * @key randomness Where does the random come from? I don't think `generateKeyPair` will make this test fail intermittently. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/32308#discussion_r3778320742 PR Review Comment: https://git.openjdk.org/jdk/pull/32308#discussion_r3778331888
