-
Notifications
You must be signed in to change notification settings - Fork 7
lzma: update to version 24.09 #76
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
base: master
Are you sure you want to change the base?
Conversation
db026fb
to
eee7c7c
Compare
New versions of LZMA are distributed as 7z archives here: If someones wants to investigate the C++ library, it can be found in the |
5ee90e3
to
7956a47
Compare
7956a47
to
1acda32
Compare
crnlib/lzma/Ppmd7Enc.c: R->Low += start * R->Range; Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
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]; | ^
1acda32
to
6a6b5a7
Compare
@@ -486,7 +486,7 @@ void Bcj2Enc_Encode(CBcj2Enc *p) | |||
// (0 < p->tempPos <= 4) | |||
do | |||
p->temp[i] = src[i]; | |||
while (++i != rem); | |||
while (++i != rem + 1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't any make any sense. How would you fix a buffer overflow by making it copy MORE data?
I suggest not making any local edits to 3rd-party libraries unless it is truly necessary.
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.