From 21f7f36b9e2375908c246c86268271bd2b067369 Mon Sep 17 00:00:00 2001 From: Jiangli Zhou Date: Thu, 14 Aug 2014 21:46:27 -0400 Subject: [PATCH] 8044269: Analysis of archive files Add checksum verification. Reviewed-by: iklam, dholmes, mschoene --- jdk/make/lib/CoreLibraries.gmk | 2 +- jdk/src/java.base/share/native/libzip/CRC32.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/jdk/make/lib/CoreLibraries.gmk b/jdk/make/lib/CoreLibraries.gmk index 852879f09ee..6e17ae0634a 100644 --- a/jdk/make/lib/CoreLibraries.gmk +++ b/jdk/make/lib/CoreLibraries.gmk @@ -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, \ diff --git a/jdk/src/java.base/share/native/libzip/CRC32.c b/jdk/src/java.base/share/native/libzip/CRC32.c index e9185b5fb1b..b03b2b9c53c 100644 --- a/jdk/src/java.base/share/native/libzip/CRC32.c +++ b/jdk/src/java.base/share/native/libzip/CRC32.c @@ -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); }