8044269: Analysis of archive files

Add checksum verification.

Reviewed-by: iklam, dholmes, mschoene
This commit is contained in:
Jiangli Zhou 2014-08-14 21:46:27 -04:00
parent 5ef6775117
commit 21f7f36b9e
2 changed files with 3 additions and 2 deletions

View File

@ -224,7 +224,7 @@ $(eval $(call SetupNativeCompilation,BUILD_LIBZIP, \
$(call SET_SHARED_LIBRARY_ORIGIN) \
$(EXPORT_ZIP_FUNCS), \
LDFLAGS_windows := -export:ZIP_Open -export:ZIP_Close -export:ZIP_FindEntry \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry jvm.lib \
-export:ZIP_ReadEntry -export:ZIP_GetNextEntry -export:ZIP_CRC32 jvm.lib \
$(WIN_JAVA_LIB), \
LDFLAGS_SUFFIX_linux := -ljvm -ljava $(LIBZ), \
LDFLAGS_SUFFIX_solaris := -ljvm -ljava $(LIBZ) -lc, \

View File

@ -54,7 +54,8 @@ Java_java_util_zip_CRC32_updateBytes(JNIEnv *env, jclass cls, jint crc,
return crc;
}
JNIEXPORT jint ZIP_CRC32(jint crc, const jbyte *buf, jint len)
JNIEXPORT jint JNICALL
ZIP_CRC32(jint crc, const jbyte *buf, jint len)
{
return crc32(crc, (Bytef*)buf, len);
}