提交 5bd47730 编写于 作者: C chegar

Merge

...@@ -44,7 +44,7 @@ or method in any class or interface in this package will cause a ...@@ -44,7 +44,7 @@ or method in any class or interface in this package will cause a
For overviews, tutorials, examples, guides, and tool documentation, For overviews, tutorials, examples, guides, and tool documentation,
please see: please see:
<ul> <ul>
<li><a href="../../../guide/serialization">Serialization Enhancements</a> <li><a href="../../../technotes/guides/serialization">Serialization Enhancements</a>
</ul> </ul>
@since JDK1.0 @since JDK1.0
......
...@@ -38,6 +38,8 @@ ...@@ -38,6 +38,8 @@
#include "zlib.h" #include "zlib.h"
#include "java_util_zip_Inflater.h" #include "java_util_zip_Inflater.h"
#define MIN2(x, y) ((x) < (y) ? (x) : (y))
#define ThrowDataFormatException(env, msg) \ #define ThrowDataFormatException(env, msg) \
JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg) JNU_ThrowByName(env, "java/util/zip/DataFormatException", msg)
...@@ -128,7 +130,7 @@ Java_java_util_zip_Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr, ...@@ -128,7 +130,7 @@ Java_java_util_zip_Inflater_inflateBytes(JNIEnv *env, jobject this, jlong addr,
* *
* Use 20 bytes as the "safe cutoff" number. * Use 20 bytes as the "safe cutoff" number.
*/ */
jint in_len = MIN(this_len, len + 20); jint in_len = MIN2(this_len, len + 20);
jint consumed; jint consumed;
in_buf = (jbyte *) malloc(in_len); in_buf = (jbyte *) malloc(in_len);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册