mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8252739: Deflater.setDictionary(byte[], int off, int len) ignores the starting offset for the dictionary
Reviewed-by: uschindler, alanb
This commit is contained in:
parent
5f1d6120a5
commit
812b39f574
2 changed files with 253 additions and 1 deletions
|
@ -105,7 +105,7 @@ Java_java_util_zip_Deflater_setDictionary(JNIEnv *env, jclass cls, jlong addr,
|
|||
Bytef *buf = (*env)->GetPrimitiveArrayCritical(env, b, 0);
|
||||
if (buf == NULL) /* out of memory */
|
||||
return;
|
||||
res = deflateSetDictionary(jlong_to_ptr(addr), buf, len);
|
||||
res = deflateSetDictionary(jlong_to_ptr(addr), buf + off, len);
|
||||
(*env)->ReleasePrimitiveArrayCritical(env, b, buf, 0);
|
||||
checkSetDictionaryResult(env, addr, res);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue