changeset 10856:a04442e84bbb

8044269: Analysis of archive files. Summary: Add checksum verification. Reviewed-by: iklam, dholmes, mschoene
author jiangli
date Thu, 14 Aug 2014 21:46:27 -0400
parents 9474605c7624
children b63e31c78326
files make/lib/CoreLibraries.gmk src/java.base/share/native/libzip/CRC32.c
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/make/lib/CoreLibraries.gmk	Thu Aug 07 12:57:23 2014 -0700
+++ b/make/lib/CoreLibraries.gmk	Thu Aug 14 21:46:27 2014 -0400
@@ -224,7 +224,7 @@
         $(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, \
--- a/src/java.base/share/native/libzip/CRC32.c	Thu Aug 07 12:57:23 2014 -0700
+++ b/src/java.base/share/native/libzip/CRC32.c	Thu Aug 14 21:46:27 2014 -0400
@@ -54,7 +54,8 @@
     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);
 }