diff options
| -rw-r--r-- | inflate.c | 7 |
1 files changed, 2 insertions, 5 deletions
| @@ -1446,7 +1446,6 @@ int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { | |||
| 1446 | struct inflate_state FAR *state; | 1446 | struct inflate_state FAR *state; |
| 1447 | struct inflate_state FAR *copy; | 1447 | struct inflate_state FAR *copy; |
| 1448 | unsigned char FAR *window; | 1448 | unsigned char FAR *window; |
| 1449 | unsigned wsize; | ||
| 1450 | 1449 | ||
| 1451 | /* check input */ | 1450 | /* check input */ |
| 1452 | if (inflateStateCheck(source) || dest == Z_NULL) | 1451 | if (inflateStateCheck(source) || dest == Z_NULL) |
| @@ -1477,10 +1476,8 @@ int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { | |||
| 1477 | copy->distcode = copy->codes + (state->distcode - state->codes); | 1476 | copy->distcode = copy->codes + (state->distcode - state->codes); |
| 1478 | } | 1477 | } |
| 1479 | copy->next = copy->codes + (state->next - state->codes); | 1478 | copy->next = copy->codes + (state->next - state->codes); |
| 1480 | if (window != Z_NULL) { | 1479 | if (window != Z_NULL) |
| 1481 | wsize = 1U << state->wbits; | 1480 | zmemcpy(window, state->window, state->whave); |
| 1482 | zmemcpy(window, state->window, wsize); | ||
| 1483 | } | ||
| 1484 | copy->window = window; | 1481 | copy->window = window; |
| 1485 | dest->state = (struct internal_state FAR *)copy; | 1482 | dest->state = (struct internal_state FAR *)copy; |
| 1486 | return Z_OK; | 1483 | return Z_OK; |
