On Fri, 24 Oct 2025 19:44:02 GMT, Mark Powers <[email protected]> wrote:

>> src/java.base/share/classes/sun/security/pkcs12/MacData.java line 160:
>> 
>>> 158:             keySpec = new PBEKeySpec(password);
>>> 159:         }
>>> 160:         pbeKey = skf.generateSecret(keySpec);
>> 
>> If the line above fails, there is no chance to clean `keySpec`. Create a big 
>> try-finally block.
>
> I assume you mean to put line 160 in the existing try-finally block rather 
> than create another try-finally block just for this.

Yes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24429#discussion_r2462073317

Reply via email to