On Mon, 22 Sep 2025 15:58:52 GMT, Weijun Wang <[email protected]> wrote:

>> The JVM will crash when given a zero byte seed length for 
>> SecureRandom.generateSeed() while using the Window's PRNG.  The solution is 
>> to first check to see if the seed is null or not and if null then generate a 
>> zero length byte array.  This may be odd but this mimics the same behavior 
>> in other operating systems such as MacOS and Linux.
>> 
>> The new unit test case* provided with this PR replicates the issue before 
>> the fix and is confirmed not to replicate the issue after the proposed fix.
>> 
>> * The TestStrong.java unit test code is a contribution from @jaikiran, thank 
>> you!
>
> Marked as reviewed by weijun (Reviewer).

Thank you for your review @wangweij

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

PR Comment: https://git.openjdk.org/jdk/pull/27302#issuecomment-3320134816

Reply via email to