0
0
mirror of https://github.com/madler/zlib.git synced 2026-01-18 17:11:27 +01:00

Revert previous commit, restoring the memcpy() call.

The reported issue was due to an error in their test code, not in
inflate. This use of memcpy() in inflate is correct.
This commit is contained in:
Mark Adler
2025-02-02 11:04:40 -08:00
parent ab0266a362
commit ed1610791c

View File

@@ -884,12 +884,12 @@ int ZEXPORT inflate(z_streamp strm, int flush) {
if (copy > have) copy = have;
if (copy > left) copy = left;
if (copy == 0) goto inf_leave;
zmemcpy(put, next, copy);
have -= copy;
next += copy;
left -= copy;
put += copy;
state->length -= copy;
do {
*put++ = *next++;
} while (--copy);
break;
}
Tracev((stderr, "inflate: stored end\n"));