diff options
| -rw-r--r-- | inflate.c | 2 |
1 files changed, 2 insertions, 0 deletions
| @@ -197,6 +197,7 @@ int ZEXPORT inflateInit2_(z_streamp strm, int windowBits, | |||
| 197 | state = (struct inflate_state FAR *) | 197 | state = (struct inflate_state FAR *) |
| 198 | ZALLOC(strm, 1, sizeof(struct inflate_state)); | 198 | ZALLOC(strm, 1, sizeof(struct inflate_state)); |
| 199 | if (state == Z_NULL) return Z_MEM_ERROR; | 199 | if (state == Z_NULL) return Z_MEM_ERROR; |
| 200 | zmemzero(state, sizeof(struct inflate_state)); | ||
| 200 | Tracev((stderr, "inflate: allocated\n")); | 201 | Tracev((stderr, "inflate: allocated\n")); |
| 201 | strm->state = (struct internal_state FAR *)state; | 202 | strm->state = (struct internal_state FAR *)state; |
| 202 | state->strm = strm; | 203 | state->strm = strm; |
| @@ -1338,6 +1339,7 @@ int ZEXPORT inflateCopy(z_streamp dest, z_streamp source) { | |||
| 1338 | copy = (struct inflate_state FAR *) | 1339 | copy = (struct inflate_state FAR *) |
| 1339 | ZALLOC(source, 1, sizeof(struct inflate_state)); | 1340 | ZALLOC(source, 1, sizeof(struct inflate_state)); |
| 1340 | if (copy == Z_NULL) return Z_MEM_ERROR; | 1341 | if (copy == Z_NULL) return Z_MEM_ERROR; |
| 1342 | zmemzero(copy, sizeof(struct inflate_state)); | ||
| 1341 | window = Z_NULL; | 1343 | window = Z_NULL; |
| 1342 | if (state->window != Z_NULL) { | 1344 | if (state->window != Z_NULL) { |
| 1343 | window = (unsigned char FAR *) | 1345 | window = (unsigned char FAR *) |
