-
Bug
-
Resolution: Fixed
-
P4
-
13
-
b03
Some JNI methods have a isCopy pointer that should be set to JNI_FALSE/JNI_TRUE if a copy is not made/made.
If we only consider cases where the methods return non NULL elements and then look at the isCopy value, there is one corner case where isCopy is not set.
Which means a user could mistakenly do this:
jboolean isCopy;
boolOrig = env->GetBooleanArrayElements(arrayOrig, &isCopy);
and if arrayOrig is of length 0, then isCopy is not set to JNI_FALSE.
If we only consider cases where the methods return non NULL elements and then look at the isCopy value, there is one corner case where isCopy is not set.
Which means a user could mistakenly do this:
jboolean isCopy;
boolOrig = env->GetBooleanArrayElements(arrayOrig, &isCopy);
and if arrayOrig is of length 0, then isCopy is not set to JNI_FALSE.