Skip to content

Commit

Permalink
MAX_PATH=1024 (#222)
Browse files Browse the repository at this point in the history
* MAX_PATH=1024

* MZ_ZIP_MAX_IO_BUF_SIZE = 8K
  • Loading branch information
kuba-- committed Dec 25, 2021
1 parent c30cb27 commit 3e9952a
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
/test/build/
/xcodeproj/
.vscode/
Testing/

# Object files
*.o
Expand Down
4 changes: 2 additions & 2 deletions src/miniz.h
Original file line number Diff line number Diff line change
Expand Up @@ -1133,7 +1133,7 @@ extern "C" {
enum {
/* Note: These enums can be reduced as needed to save memory or stack space -
they are pretty conservative. */
MZ_ZIP_MAX_IO_BUF_SIZE = 64 * 1024,
MZ_ZIP_MAX_IO_BUF_SIZE = 8 * 1024,
MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = 512,
MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 512
};
Expand Down Expand Up @@ -8560,7 +8560,7 @@ mz_bool mz_zip_writer_add_read_buf_callback(

pState = pZip->m_pState;
cur_archive_file_ofs = pZip->m_archive_size;

if ((!pState->m_zip64) && (max_size > MZ_UINT32_MAX)) {
/* Source file is too large for non-zip64 */
/*return mz_zip_set_error(pZip, MZ_ZIP_ARCHIVE_TOO_LARGE); */
Expand Down
2 changes: 1 addition & 1 deletion src/zip.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ typedef long ssize_t; /* byte count or error */
#endif

#ifndef MAX_PATH
#define MAX_PATH 32767 /* # chars in a path name including NULL */
#define MAX_PATH 1024 /* # chars in a path name including NULL */
#endif

/**
Expand Down

0 comments on commit 3e9952a

Please sign in to comment.