8196897: Improve PRNG support

Reviewed-by: valeriep, mullan, igerasim
This commit is contained in:
Weijun Wang 2018-03-08 14:04:39 +08:00
parent dfcc6b3878
commit 532d4a59c6

View File

@ -311,6 +311,9 @@ JNIEXPORT jbyteArray JNICALL Java_sun_security_mscapi_PRNG_generateSeed
} }
result = env->NewByteArray(length); result = env->NewByteArray(length);
if (result == NULL) {
__leave;
}
env->SetByteArrayRegion(result, 0, length, (jbyte*) pbData); env->SetByteArrayRegion(result, 0, length, (jbyte*) pbData);
} else { // length == 0 } else { // length == 0