Details
-
Bug
-
Resolution: Fixed
-
P4
-
None
-
b20
-
generic
-
generic
Description
In the file `src/java.base/share/native/libjava/jni_util.c`, there is a macro for calculating minimum buffer size `MALLOC_MIN4`. While all current uses of the MALLOC_MIN4 macro are with a parameter of jint type, the macro itself is parameter type agnostic. This check can be more strict —at no computational cost— and prevent mistakes if there were a future use with a data type greater than jint (i.e. jlong).