-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
strncpy filename_size #273
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't solve the problem since the maximum path length is 260 symbols.
MAX_PATH restrictions apply until Windows 10 version 1607
as a solution I can suggest this code:
/* Note: MAX_PATH restrictions apply until Windows 10 version 1607
*/
#if defined(_WIN32)
# define MAX_FILE_PATH 256
#else
# define MAX_FILE_PATH 512
#endif
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 = 8 * 1024,
MZ_ZIP_MAX_ARCHIVE_FILENAME_SIZE = MAX_FILE_PATH,
MZ_ZIP_MAX_ARCHIVE_FILE_COMMENT_SIZE = 512
};
But this is totally not related to the issue which you came across. |
...Moreover lets take a look step by step: we need a minimum of
So if you are on windows where |
MAX_PATH is declared inside minwindef.h. |
What problem exactly? |
this did not solve the problem, I tried to build it as an independent library and the ide tells me that MAX_PATH is defined in minwindef.h. |
it seems strange to me that when compiling without the -DCMAKE_BUILD_TYPE=Release, it does not give such an error. |
Fixes https://github.com/kuba--/zip/issues/272