< prev index next >

src/java.base/share/native/libverify/check_format.c

Print this page
rev 54010 : 8074817: Resolve disabled warnings for libverify
Reviewed-by: XXX

*** 21,30 **** --- 21,32 ---- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA * or visit www.oracle.com if you need additional information or have any * questions. */ + #include <assert.h> + #include <limits.h> #include <setjmp.h> #include <stdlib.h> #include <string.h> #include "jni.h"
*** 230,240 **** * the dots should have been replaced by slashes. */ JNIEXPORT jboolean VerifyClassname(char *name, jboolean allowArrayClass) { ! unsigned int length = strlen(name); char *p; if (length > 0 && name[0] == JVM_SIGNATURE_ARRAY) { if (!allowArrayClass) { return JNI_FALSE; --- 232,244 ---- * the dots should have been replaced by slashes. */ JNIEXPORT jboolean VerifyClassname(char *name, jboolean allowArrayClass) { ! size_t s = strlen(name); ! assert(s <= UINT_MAX); ! unsigned int length = (unsigned int)s; char *p; if (length > 0 && name[0] == JVM_SIGNATURE_ARRAY) { if (!allowArrayClass) { return JNI_FALSE;
< prev index next >