changeset 52155:c31b6e1c4383

8196897: Improve PRNG support Reviewed-by: valeriep, mullan, igerasim
author weijun
date Thu, 08 Mar 2018 14:04:39 +0800
parents a4d4c609d70c
children 1801fada294a
files src/jdk.crypto.mscapi/windows/native/libsunmscapi/security.cpp
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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