Skip to content
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

zip: conform slashes #637

Closed
wants to merge 2 commits into from
Closed

Conversation

jeremybernstein
Copy link
Contributor

conform slashes to MZ_PATH_SLASH_UNIX before writing to zip stream. See #636

mz_zip.c Outdated
@@ -787,12 +788,16 @@ static int32_t mz_zip_entry_write_header(void *stream, uint8_t local, mz_zip_fil
}

if (err == MZ_OK) {
if (mz_stream_write(stream, filename, filename_length) != filename_length)
char conformed_filename[512];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to just use MZ_ALLOC here, and if it returns NULL then return MZ_ERROR_MEM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @nmoinvaz, modifications checked in.

@nmoinvaz nmoinvaz added zip ZIP file format platform specific Issue only affects a specific platform labels Jul 16, 2022
@nmoinvaz
Copy link
Member

nmoinvaz commented Aug 6, 2022

I have decided to go a different route in #644 so we don't have to allocate any memory.

@nmoinvaz nmoinvaz closed this Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform specific Issue only affects a specific platform zip ZIP file format
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants