Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

inflat behavior different from original zlib-1.2.11 #26

@guowangy

Description

@guowangy

inflat behavior different from original zlib-1.2.11, which cause a unittest failure in nghttp2 project.

I try to reproduce it in test-zlib.c.
Step to reproduce: gcc -lz test-zlib.c && ./a.out

The test data compress/deflat from input string first, then try to inflat first 16 bytes, then next 32 bytes.
It fail at avail_in check (should not equal 0).

Here is output of original zlib-1.2.11

avail_in: 265, next_in: 140736127949776, avail_out: 16, next_out: 140736127945680
after inflate: inlen: 265, outlen: 16
###output length: 16, content: "THE SOFTWARE IS "
avail_in: 217, next_in: 140736127949824, avail_out: 32, next_out: 140736127945680
after inflate: inlen: 217, outlen: 32
###output length: 32, content: "PROVIDED "AS IS", WITHOUT WARRAN"

and below is output of jtk-zlib:

avail_in: 266, next_in: 140731118518864, avail_out: 16, next_out: 140731118514768
after inflate: inlen: 266, outlen: 16
###output length: 16, content: "THE SOFTWARE IS "
avail_in: 0, next_in: 140731118519130, avail_out: 32, next_out: 140731118514768
after inflate: inlen: 0, outlen: 32
###output length: 32, content: "PROVIDED "AS IS", WITHOUT WARRAN"
a.out: test.c:119: main: Assertion `inproclen > 0' failed.
Aborted (core dumped)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions