# HG changeset patch # User weijun # Date 1520489079 -28800 # Node ID c31b6e1c4383a52ba11c027decf71bf7eda951b0 # Parent a4d4c609d70c06a5f6d5c0de3503c94a18a89717 8196897: Improve PRNG support Reviewed-by: valeriep, mullan, igerasim diff -r a4d4c609d70c -r c31b6e1c4383 src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp --- a/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Tue Oct 16 19:07:47 2018 -0400 +++ b/src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp Thu Mar 08 14:04:39 2018 +0800 @@ -311,6 +311,9 @@ } result = env->NewByteArray(length); + if (result == NULL) { + __leave; + } env->SetByteArrayRegion(result, 0, length, (jbyte*) pbData); } else { // length == 0