RFR: 8258915: Temporary buffer cleanup [v2]

Valerie Peng valeriep at openjdk.java.net
Fri Jan 22 14:57:40 UTC 2021


On Fri, 22 Jan 2021 14:35:46 GMT, Weijun Wang <weijun at openjdk.org> wrote:

>> src/java.base/share/classes/com/sun/crypto/provider/PrivateKeyInfo.java line 98:
>> 
>>> 96: 
>>> 97:     public void clear() {
>>> 98:         Arrays.fill(privkey, (byte)0);
>> 
>> check for null just in case?
>
> `val.data.getOctetString()` on line 82 should never return null, so I think a null check is not necessary here.

Sure.

-------------

PR: https://git.openjdk.java.net/jdk/pull/2070



More information about the security-dev mailing list