Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UZLIB_CONF_USE_MEMCPY option bug #50

Open
udovichenkoAlexander opened this issue Jun 7, 2024 · 1 comment
Open

UZLIB_CONF_USE_MEMCPY option bug #50

udovichenkoAlexander opened this issue Jun 7, 2024 · 1 comment
Labels

Comments

@udovichenkoAlexander
Copy link

memcpy cannot be used, because memory region may overlap (the behavior is undefined). copy must be made byte by byte.

Simple check with tgunzip:

  1. set UZLIB_CONF_USE_MEMCPY to 1
  2. set OUT_CHUNK_SIZE to 1024
  3. do not use ring buffer
  4. try decopress simple text file (12341234123411111113333333). I attach test.gz
  5. tgunzip return Error during decompression: -4 (TINF_CHKSUM_ERROR)

test.txt
test.gz

@github-actions github-actions bot added the Stale label Jun 22, 2024
Repository owner deleted a comment from github-actions bot Jun 23, 2024
@pfalcon pfalcon added triaged and removed Stale labels Jun 23, 2024
@pfalcon
Copy link
Owner

pfalcon commented Jun 23, 2024

Thanks for the report and testcase. Apparently, needs to be replaced by memmove(). Sadly, I don't have enough resource to work on the project now, so that will have to wait.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants