Henrik Rydgård and Claude Opus 5.5
df40740ae0
ZipFileReader: Lock the archive when looking up a file
...
Texture replacement looks up files from several IO threads at once, while another thread may be
reading from the same archive. libzip isn't thread safe, and a name lookup writes to the archive: it
caches each name's guessed encoding, and allocates a converted copy of CP437 names.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com >
2026-10-20 11:22:31 +02:00
Henrik Rydgård and Claude Opus 5.5
7b9e1a1c93
ZipFileReader: Look up the exact name before the case insensitive one
...
The case insensitive lookup compares against every name in the zip, while an exact one uses libzip's
hash table. Texture packs can have tens of thousands of files.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com >
2026-10-20 11:22:31 +02:00
Henrik Rydgård and Claude Sonnet 5
6ee6641fe5
ZipFileReader: guard against implausible/overflowing declared sizes
...
ReadFile()/ReadSingleFileFromZip() allocated/resized directly off a
zip entry's declared uncompressed size with no sanity check. A
crafted size near UINT64_MAX would wrap ReadFile()'s "size + 1" to 0,
allocating almost nothing while zip_fread() still writes the full
declared size into it - a length-field-driven heap overflow from a
malicious zip/texture pack. Both now reject entries above a generous
4GB cap. Also fixes GetFileInfo() reading zstat.name[strlen(name)-1]
unchecked, which underflows to SIZE_MAX for a zero-length entry name.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com >
Claude-Session: https://claude.ai/code/session_01L4QAoxV2KY7ek4PcZw3WvY
2026-08-10 11:26:24 +02:00
Henrik Rydgård
e8d648e91d
InstallZip: Fix problem where the delete-after option didn't work
...
The file was held open.
2026-03-06 10:57:22 +01:00
Henrik Rydgård
b1fa6b4671
Remove some uses of textScale
2026-02-06 14:30:47 +01:00
Henrik Rydgård
de702ced45
Use std::string_view in VFS
2026-02-06 13:22:35 +01:00
刘皓
0b3cf1de8d
Check that source is non-null before attempting to use it in the ZipContainer constructor
2026-01-08 11:59:12 -05:00
刘皓
17acfe31a3
Fix several problems with ZipContainer in Common/File/VFS/ZipFileReader.cpp
2026-01-02 14:25:13 -05:00
刘皓
5716cbd41d
Use the libretro VFS interface in libretro builds
2026-01-01 00:24:01 -05:00
Henrik Rydgård
52c4c31508
Runtime atlas generation
2025-09-17 09:49:54 -06:00
Henrik Rydgård
61a3d40303
Fix memory leak when looking for icons in texture replacement zip files
2025-06-14 09:49:07 +02:00
Henrik Rydgård
91bf4d5b5c
Correct some log categories, add UI category, some warning fixes
2025-04-09 13:45:21 +02:00
Henrik Rydgård
4b2bce388c
Minor error handling improvements, remove redundant Exists checks
2025-02-18 10:56:49 -06:00
Henrik Rydgård
b7cec64fb2
ZipFileReader: Small performance optimization when reading by filename
2025-02-13 11:42:46 -06:00
LunaMoo
ed9b202671
Basic custom icon support (through texture replacement)
...
uses path textures/gameID/icon.png, or icon.png from textures.zip.
requires restart to re-load icons.
2025-02-13 10:47:58 -06:00
Henrik Rydgård
e67b673e4e
Fix regression in zip texture packs
...
Can't seek in compressed zips. Let's add a comment too to not do this
again.
Thanks Nukem for debugging.
2025-01-11 09:37:37 +01:00
Henrik Rydgård
4dd3621fa0
Remove some unnecessary <algorithm> includes.
2024-12-18 17:04:27 +01:00
Henrik Rydgård
36d10b89e2
Remove locks on safe zip file operations (that don't involve the file pointer)
2024-11-30 11:55:36 +01:00
Henrik Rydgård
ed296e4587
ZipFileReader: Save the zip path so we can log it
2024-11-30 02:44:01 +01:00
Henrik Rydgård
c30ec47937
ZipFileReader: Better implementation of Rewind
2024-10-28 17:02:03 +01:00
Henrik Rydgård
e51c58716b
Fix minor code issues flagged by PVS-Studio and reported by alphrixus.
2024-10-10 14:10:30 +02:00
Herman Semenov
45429bcd85
[Common/Data/File/Input/Net/Serialize/System/UI] Using for based loop C++17 and replaced on structured binding map C++17
2024-09-17 17:42:08 +02:00
Henrik Rydgård
e01ca5b057
Logging API change (refactor) ( #19324 )
...
* Rename LogType to Log
* Explicitly use the Log:: enum when logging. Allows for autocomplete when editing.
* Mac/ARM64 buildfix
* Do the same with the hle result log macros
* Rename the log names to mixed case while at it.
* iOS buildfix
* Qt buildfix attempt, ARM32 buildfix
2024-07-14 14:42:59 +02:00
Signed-off-by: Henrik Rydgård
9c3c23daa6
Fixed memleaks and incorrect add tab in ui::view_group
...
Signed-off-by: Herman Semenov <GermanAizek@yandex.ru >
2024-04-02 13:48:16 +03:00
Henrik Rydgård
0170e8f081
Logging updates
2024-01-29 00:54:24 +01:00
Herman Semenov
4ea842a3c1
Minor replaced insert to emplace C++11
2023-12-19 16:06:48 +03:00
Herman Semenov
b8748ae9e5
[Common/File/GPU/Render/Input] Using reserve if possible
2023-12-15 14:00:51 +03:00
German Semenov
c27481d637
GPU, VFS, UI: Fixed minor memleaks
2023-09-15 12:23:54 +03:00
Henrik Rydgård
919979eece
Disable excessive logging
2023-05-02 11:40:50 +02:00
Henrik Rydgård
ee7e8d7c06
Add a unit test, fix listing zip directories
2023-05-02 11:35:45 +02:00
Henrik Rydgård
35aff7eaf9
Fix logic in ZipFileReader file listing
2023-05-01 23:20:38 +02:00
Henrik Rydgård
8484dd4917
Nicer logging if no texture.zip file is there
2023-03-16 22:59:26 +01:00
Henrik Rydgård
306fdde9d0
Correct error handling for missing ini (only accept it in directories, not zip)
2023-03-08 09:29:19 +01:00
Henrik Rydgård
74cad6b521
Quick buildfix
2023-03-08 09:17:26 +01:00
Henrik Rydgård
e277db63c0
Optimize away those extra GetFileInfo, since both backends can get the size during Open efficiently.
2023-03-08 09:11:25 +01:00
Unknown W. Brackets
bfb7a5b093
Common: Cleanup an unused constant.
2023-03-07 22:00:30 -08:00
Unknown W. Brackets
2fce2df7f6
Common: Ensure VFS references not directly deleted.
2023-03-07 21:51:47 -08:00
Unknown W. Brackets
84b7df62ab
Common: Cleanup zip file stat flag checks.
2023-03-07 21:36:33 -08:00
Henrik Rydgård
97cf5f8d81
More renaming, initial implementation of manual file access for both VFS backends
2023-03-07 19:37:19 +01:00
Henrik Rydgård
23b310f59a
VFS: Add boilerplate
2023-03-07 10:19:51 +01:00
Henrik Rydgård
ac94d3febf
VFS: Add support for opening zip files through a Content URI
2023-03-06 16:44:48 +01:00
Henrik Rydgård
53172eff63
Renaming and file splitting
2023-03-06 16:42:50 +01:00