Added check to ensure symbolic link is less than 64kb. #620

This commit is contained in:
Nathan Moinvaziri 2022-11-30 11:00:46 -08:00
parent 848c3e3503
commit 3bce6eea20

View File

@ -736,7 +736,7 @@ int32_t mz_zip_reader_entry_save_file(void *handle, const char *path) {
if (reader->file_info->linkname != NULL && *reader->file_info->linkname != 0) {
/* Create symbolic link from UNIX1 extrafield */
err = mz_os_make_symlink(pathwfs, reader->file_info->linkname);
} else {
} else if (reader->file_info->uncompressed_size < UINT16_MAX) {
/* Create symbolic link from zip entry contents */
mz_stream_mem_create(&stream);
mz_stream_mem_set_buffer_limit(stream, reader->file_info->uncompressed_size);