Filippos Karapetis
5b1e2d502c
COMMON: Use C++ 11 range-based for loops
2025-03-27 13:47:57 +08:00
Le Philousophe
1a4e4c1826
COMMON: Avoid valgrind errors when opening invalid ZIP files
...
Bail out of the function before jumping on values which failed to read.
2025-01-22 19:14:42 +01:00
Le Philousophe
5f720aba7c
COMMON: Remove undefined behaviours from RNC decoder
...
Shifting an amount of 16 on a 16 bits variable is UB.
Make the variables larger to not fall inside it and avoid branches.
2024-12-27 22:16:35 +02:00
Eugene Sandulenko
93ffa28ffe
COMMON: Process gracefully when unarj cannot unpack into memory
2024-11-11 01:00:19 +01:00
Cameron Cawley
6b9d40ee71
DETECTION: Support Clickteam installers in detection tables
2024-07-15 20:48:55 +03:00
Paul Gilbert
3d71d8e08c
COMMON: Move huffman.h to common/compression/
2024-07-15 02:56:12 +02:00
Cameron Cawley
1357bfe672
COMMON: Avoid including engine headers in common code for DebugChannelDef
2024-06-20 20:15:57 +01:00
elasota
968aa2fcd6
COMMON: Add support for opening an InstallShield cab inside of an archive
2023-12-29 11:15:17 +02:00
Cameron Cawley
5b1b14ad80
COMMON: Mark more symbols as const
2023-12-26 20:23:59 +01:00
Le Philousophe
93a8f7f4d6
COMMON: Move Archive API to Path
2023-12-24 13:19:25 +01:00
elasota
6ed3c946ff
COMMON: Add a way to check if an archive member is in a Mac archive so we can avoid decompressing the data fork to check for MacBinary when the resource data is always in the alt stream.
2023-12-16 19:30:23 +01:00
elasota
def3c4888a
COMMON: Add API for loading InstallShieldV3 from a stream
2023-12-07 03:56:59 +02:00
sluicebox
8f7e84a9a9
COMMON: Fix StuffIt memory leak. PVS-Studio V773
2023-12-05 09:24:31 -08:00
Le Philousophe
a700883e6f
JANITORIAL: Fix spaces vs tab mismatch
2023-11-19 11:35:35 +01:00
Kaloyan Chehlarski
f5bed36b54
COMMON: Fix edge case in InstallShield file extraction
...
It is possible for a file table to contain multiple entries for
the same file, each with a different volume. This is valid,
and means that the file can be extracted from multiple .cab
files.
However, sometimes the header can report a file as existing
in multiple volumes despite it not actually being present in
all of them. The previous policy when encountering
duplicate entries was to just overwrite, which effectively
resulted in us keeping the last encountered entry, which
would be for the highest volume id. However, when an
erroneous entry mentioned above was encountered,
extraction would fail.
This commit makes it so we now keep the entry with the
lowest volume id, and discard the rest.
2023-11-09 22:18:11 +02:00
Kaloyan Chehlarski
1a08bcc08f
ARCHIVE: Allow creating InstallShieldV3 archives with FSNode
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski
3829b41235
COMMON: Allow creating InstallShield archive with FSNode
...
This is needed for cases where SearchMan is not applicable
(e.g. during detection)
2023-11-02 18:20:44 +01:00
Kaloyan Chehlarski
ab784bdd8b
COMMON: Allow extraction of empty files from InstallShield cabs
...
It is not uncommon for an InstallShield cab to have file
entries with a size of 0; this commit makes sure that trying to
extract such a file won't result in a warning, and won't
cause a crash when calling dumpArchive() on the containing
cabinet file.
2023-10-28 16:19:34 +03:00
sluicebox
43a3aad456
COMMON: Remove unused field from Gentee Installer code
...
Fixes unused private field warning
2023-10-27 20:45:09 -07:00
Eugene Sandulenko
7f4c0c9391
JANITORIAL: Remove trailing whitepaces
2023-09-19 15:16:20 +02:00
elasota
63b01f5e85
COMMON: Strip trailing slashes from ZipArchive directories and improve directory detection. Add support for listChildren and isDirectory.
2023-09-17 19:17:33 +02:00
elasota
9892bedc61
COMMON: Add createReadStreamForAltStream to open Mac resource fork and metadata streams
2023-08-30 00:31:00 +02:00
Le Philousophe
2f7c2149e5
COMMON: Remove useless inflateZlib function
...
To write on stream it's simpler to use wrapCompressedReadStream and
writeStream function.
2023-08-28 21:49:03 +02:00
Le Philousophe
5bdd9e6f50
ALL: Unify zlib and gzio API
...
zlib is used when available and falls back on gzio.
This allows performance improvements as our CRC32 and gzio
implementations are slower than base zlib.
As zlib is available when libpng is present, this is sensible to
benefit from it.
2023-08-28 21:49:03 +02:00
Le Philousophe
be3eb09753
COMMON: Allow GZipReadStream to work on data in the middle of stream
2023-08-28 21:49:03 +02:00
Le Philousophe
191bde03ad
COMMON: Use memcpy instead of memmove
...
memove was used although the buffers were not overlapping.
Using memcpy allows for better optimizations by compiler.
2023-08-28 21:49:03 +02:00
Le Philousophe
5edf74d8a6
COMMON: Cleanup flags defines
...
In addition, use flags from RFC and not from (really) old gzip
implementations.
2023-08-28 21:49:03 +02:00
Le Philousophe
b5e3173b10
COMMON: Fix inflateZlibHeaderless name
...
The function takes a stream beginning with zlib header unlike the name
suggests.
inflateInit expects to parse a zlib header.
2023-08-28 21:49:03 +02:00
elasota
b8acbe6bee
COMMON: Archive path refactoring, add getFileName and getPathInArchive that unambiguously return the filename or the full path
2023-07-19 18:51:37 +02:00
elasota
eda8c2698f
COMMON: Fix incorrect StuffIt directory paths
2023-06-21 08:26:28 +03:00
elasota
b9175e1810
COMMON: Fix up comments
2023-06-19 21:59:24 +03:00
elasota
8cb45fe696
COMMON: Update comment to explain buggy normalization behavior more clearly
2023-06-19 21:59:24 +03:00
elasota
8ce2ffd68b
COMMON: Move Gentee Installer from V-Cruise to Common
2023-06-19 21:59:24 +03:00
elasota
654f7fd8d0
COMMON: Add comments on usage
2023-06-19 08:45:32 +03:00
elasota
907252ecbd
COMMON: Return correct path separator for InstallShieldV3
2023-06-19 08:45:32 +03:00
elasota
e53d2ec594
COMMON: Add "getPathSeparator" to Archive and return ":" for Mac archive formats
2023-06-19 08:45:32 +03:00
elasota
7be3c8f602
COMMON: Add "flattenTree" param to createStuffItArchive and preserve directory structure by default
2023-06-19 08:45:32 +03:00
Kaloyan Chehlarski
d99d325747
COMMON: Detect obfuscated and invalid files in InstallShield cabs
...
Files marked as invalid are now ignored in all IS versions. Trying to
extract an obfuscated file now results in a warning instead of just failing.
2023-04-09 13:02:30 +02:00
Kaloyan Chehlarski
ba11cf87cd
COMMON: Fix incorrectly marked split files in InstallShield cabinets
2023-04-09 13:02:30 +02:00
Kaloyan Chehlarski
6efa793a25
COMMON: Fix InstallShield v5 file list reading
...
Fixed the InstallShield archive code to correctly load the file list in
multi-cabinet v5 archives.
2023-04-09 13:02:30 +02:00
Kaloyan Chehlarski
9fb08caa4e
COMMON: Upgrade InstallShield archive code
...
Added support for files split across volumes, and for multi-volume
v5 archives to the InstallShield cabfile code.
2023-04-09 13:02:30 +02:00
Eugene Sandulenko
a542d6cad7
COMMON: Comment out unused variable
2023-03-17 16:58:44 +01:00
Vladimir Serbinenko
f513d6eee9
COMMON: Support patching clickteam installer and version used by PRCA
2023-03-13 20:17:33 +01:00
Vladimir Serbinenko
5b3fe1d916
COMMON: Error-out on an invalid clickteam compressed block
2023-03-13 20:17:33 +01:00
Miro Kropacek
a359ee1316
COMMON: Fix build when zlib not present
2023-03-04 23:38:42 +01:00
Filippos Karapetis
fc20af02d9
COMMON: Improve CRC16 error messages in Stuffit
2023-02-12 16:56:44 +02:00
Vladimir Serbinenko
2d3514d13f
COMMON: Check CRC16 in Stuffit
2023-02-12 16:56:44 +02:00
Eugene Sandulenko
1039667a08
JANIRORIAL: Reduce header dependency
2023-02-10 23:51:13 +01:00
Vladimir Serbinenko
600f33bccf
COMMON: Allow unzip to flatten tree structure
...
It's easier to some games to ignore directories
2023-01-15 19:22:34 +01:00
Vladimir Serbinenko
30717496ce
COMMON: Allow unarj to flatten tree structure
...
It's easier to some games to ignore directories
2023-01-15 19:22:34 +01:00