Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@ jobs:
export VCPKG_ROOT=$VCPKG_INSTALLATION_ROOT
export ANDROID_NDK_HOME=$ANDROID_NDK_LATEST_HOME
export ANDROID_NDK_ROOT=$ANDROID_NDK_LATEST_HOME
git -C $VCPKG_INSTALLATION_ROOT fetch origin f77737496dabd44c63ecc599dc0f4d6cff30d0d5
git -C $VCPKG_INSTALLATION_ROOT reset --hard f77737496dabd44c63ecc599dc0f4d6cff30d0d5
cmake --preset ${{ matrix.target }} "-GUnix Makefiles" -DCMAKE_BUILD_TYPE=RelWithDebInfo
cmake --build --preset ${{ matrix.target }}
cmake --build --preset ${{ matrix.target }} --target install/strip
Expand Down
3 changes: 3 additions & 0 deletions src/util/ZipSerialize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,14 @@ vector<string> ZipSerialize::list() const
if(!d)
THROW("Zip file is not open");

constexpr size_t maxEntries = 1000;
vector<string> list;
for(int unzResult = unzGoToFirstFile(d.get()); unzResult != UNZ_END_OF_LIST_OF_FILE; unzResult = unzGoToNextFile(d.get()))
{
if(unzResult != UNZ_OK)
THROW("Failed to go to the next file inside ZIP container. ZLib error: %d", unzResult);
if(list.size() >= maxEntries)
THROW("ZIP container exceeds maximum entry count of %zu", maxEntries);

unz_file_info fileInfo{};
unzResult = unzGetCurrentFileInfo(d.get(), &fileInfo, nullptr, 0, nullptr, 0, nullptr, 0);
Expand Down
Loading