Debian Patches

Status for karchive/5.115.0-4

Patch Description Author Forwarded Bugs Origin Last update
upstream_k7zip-fix-simplify-GetUi-functions.patch [PATCH] k7zip: fix/simplify GetUi*() functions
Rather than taking the offset for the buffer passed in, directly pass
the buffer to the start of the data to read from.

This:
- fixes reading of 7zip files on certain architectures (32bit big
endian)
- simplifies the GetUi*() functions, which do not need to take offsets
into account
- fixes GetUi16() not using the offset for reading the 2nd byte;
it did not cause any issue as GetUi16() used to be always invoked
with offset=0

(cherry picked from commit 776efbfc5784cacfde2e0036452ddabd06cf4138)
Pino Toscano <pino@kde.org> no 2024-11-22
upstream_kzip-fix-reading-of-ZIP64-fields-on-certain-architec.patch [PATCH] kzip: fix reading of ZIP64 fields on certain architectures
Casting a char* to quint64* raises warnings alignment on architectures
such as sparc:

src/kzip.cpp: In function ‘bool parseExtraField(const char*, int, bool, ParseFileInfo&)’:
src/kzip.cpp:265:59: warning: cast from ‘const char*’ to ‘const quint64*’ {aka ‘const long long unsigned int*’} increases required alignment of target type [-Wcast-align]
265 | pfi.uncompressedSize = qFromLittleEndian(*reinterpret_cast<const quint64 *>(buffer));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/kzip.cpp:268:57: warning: cast from ‘const char*’ to ‘const quint64*’ {aka ‘const long long unsigned int*’} increases required alignment of target type [-Wcast-align]
268 | pfi.compressedSize = qFromLittleEndian(*reinterpret_cast<const quint64 *>(buffer + 8));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The effect of that warning is actually a SIGBUS crash.

To avoid alignment issuesm introduce an helper function to read a
quint64 from the specified buffer. The manual reading of the bytes also
gets rid of the usage of qFromLittleEndian().

(cherry picked from commit 06b14a5c8dd53e4dc01c43ea91e1558d75539f47)
Pino Toscano <pino@kde.org> no 2024-11-24

All known versions for source package 'karchive'

Links