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

lzma: update to version 24.09 #76

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

lzma: update to version 24.09 #76

wants to merge 4 commits into from

Conversation

illwieckz
Copy link
Member

That's an old branch sitting on my computer, updating the very old LZMA shipped with crunch with the last one from upstream.

What annoys me is that Crunch is a C++ library but it shipped with the C LZMA library, adding custom wrapping code to make it compilable with a C++ compiler. I don't want to have to replay such change on every LZMA update, so I included it as a C library, meaning I had to make Crunch not only a C++ project but a C++ & C project, meaning selecting a different compiler requires to select both the C++ and C compiler…

An alternative would be to move to the C++ LZMA library but then that requires to port the code to the C++ LZMA API I guess… and I'm lazy. All I want is to make sure we use latest versions of libraries and don't sit on very old dependencies with potential unfixed decades-old issues.

@illwieckz
Copy link
Member Author

New versions of LZMA are distributed as 7z archives here:

If someones wants to investigate the C++ library, it can be found in the CPP/ folder of the LZMA source archive.

crnlib/lzma/Ppmd7Enc.c Fixed Show fixed Hide fixed
crnlib/lzma/Ppmd7Enc.c:
  R->Low += start * R->Range;
Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
@illwieckz illwieckz force-pushed the illwieckz/lzma branch 2 times, most recently from 9cfaceb to eba81c5 Compare January 29, 2025 13:00
crnlib/lzma/Bcj2Enc.c: In function ‘Bcj2Enc_Encode’:
crnlib/lzma/Bcj2Enc.c:488:20: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
  488 |         p->temp[i] = src[i];
      |         ~~~~~~~~~~~^~~~~~~~
In file included from crnlib/lzma/Bcj2Enc.c:14:
crnlib/lzma/Bcj2.h:287:8: note: at offset 8 into destination object ‘temp’ of size 8
  287 |   Byte temp[8];
      |        ^
@illwieckz illwieckz force-pushed the illwieckz/lzma branch 2 times, most recently from 5ee90e3 to 7956a47 Compare January 29, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant