Skip to content

Commit

Permalink
Revert previous commit, restoring the memcpy() call.
Browse files Browse the repository at this point in the history
The reported issue was due to an error in their test code, not in
inflate. This use of memcpy() in inflate is correct.
  • Loading branch information
madler committed Feb 2, 2025
1 parent ab0266a commit ed16107
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions inflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
Expand Down

0 comments on commit ed16107

Please sign in to comment.