mirror of
https://github.com/enduro2d/enduro2d.git
synced 2025-12-12 23:36:33 +07:00
update miniz and pnpoly modules
This commit is contained in:
Submodule modules/miniz updated: 4159f8c8c3...d6566206ce
Submodule modules/pnpoly.h updated: 5ba3fd8de6...f411933b98
4
sources/3rdparty/miniz/miniz.h
vendored
4
sources/3rdparty/miniz/miniz.h
vendored
@@ -95,7 +95,7 @@
|
||||
possibility that the archive's central directory could be lost with this method if anything goes wrong, though.
|
||||
|
||||
- ZIP archive support limitations:
|
||||
No zip64 or spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
|
||||
No spanning support. Extraction functions can only handle unencrypted, stored or deflated files.
|
||||
Requires streams capable of seeking.
|
||||
|
||||
* This is a header file library, like stb_image.c. To get only a header file, either cut and paste the
|
||||
@@ -220,7 +220,7 @@ enum
|
||||
#define MZ_DEFLATED 8
|
||||
|
||||
/* Heap allocation callbacks.
|
||||
Note that mz_alloc_func parameter types purpsosely differ from zlib's: items/size is size_t, not unsigned long. */
|
||||
Note that mz_alloc_func parameter types purposely differ from zlib's: items/size is size_t, not unsigned long. */
|
||||
typedef void *(*mz_alloc_func)(void *opaque, size_t items, size_t size);
|
||||
typedef void (*mz_free_func)(void *opaque, void *address);
|
||||
typedef void *(*mz_realloc_func)(void *opaque, void *address, size_t items, size_t size);
|
||||
|
||||
2
sources/3rdparty/miniz/miniz_tinfl.c
vendored
2
sources/3rdparty/miniz/miniz_tinfl.c
vendored
@@ -498,7 +498,7 @@ tinfl_status tinfl_decompress(tinfl_decompressor *r, const mz_uint8 *pIn_buf_nex
|
||||
}
|
||||
|
||||
dist_from_out_buf_start = pOut_buf_cur - pOut_buf_start;
|
||||
if ((dist > dist_from_out_buf_start) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
|
||||
if ((dist > dist_from_out_buf_start || dist_from_out_buf_start == 0) && (decomp_flags & TINFL_FLAG_USING_NON_WRAPPING_OUTPUT_BUF))
|
||||
{
|
||||
TINFL_CR_RETURN_FOREVER(37, TINFL_STATUS_FAILED);
|
||||
}
|
||||
|
||||
15
sources/3rdparty/miniz/miniz_zip.c
vendored
15
sources/3rdparty/miniz/miniz_zip.c
vendored
@@ -2301,7 +2301,10 @@ mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, mz_uint f
|
||||
return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
|
||||
|
||||
if (!mz_zip_array_resize(pZip, &file_data_array, MZ_MAX(local_header_filename_len, local_header_extra_len), MZ_FALSE))
|
||||
return mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
|
||||
{
|
||||
mz_zip_set_error(pZip, MZ_ZIP_ALLOC_FAILED);
|
||||
goto handle_failure;
|
||||
}
|
||||
|
||||
if (local_header_filename_len)
|
||||
{
|
||||
@@ -2335,14 +2338,20 @@ mz_bool mz_zip_validate_file(mz_zip_archive *pZip, mz_uint file_index, mz_uint f
|
||||
mz_uint32 field_id, field_data_size, field_total_size;
|
||||
|
||||
if (extra_size_remaining < (sizeof(mz_uint16) * 2))
|
||||
return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
|
||||
{
|
||||
mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
|
||||
goto handle_failure;
|
||||
}
|
||||
|
||||
field_id = MZ_READ_LE16(pExtra_data);
|
||||
field_data_size = MZ_READ_LE16(pExtra_data + sizeof(mz_uint16));
|
||||
field_total_size = field_data_size + sizeof(mz_uint16) * 2;
|
||||
|
||||
if (field_total_size > extra_size_remaining)
|
||||
return mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
|
||||
{
|
||||
mz_zip_set_error(pZip, MZ_ZIP_INVALID_HEADER_OR_CORRUPTED);
|
||||
goto handle_failure;
|
||||
}
|
||||
|
||||
if (field_id == MZ_ZIP64_EXTENDED_INFORMATION_FIELD_HEADER_ID)
|
||||
{
|
||||
|
||||
2
sources/3rdparty/pnpoly.h/pnpoly.h
vendored
2
sources/3rdparty/pnpoly.h/pnpoly.h
vendored
@@ -62,7 +62,7 @@ PNPOLY_DEF int pnpoly_soa(int nvert, const float *vertx, const float *verty, flo
|
||||
|
||||
/*
|
||||
Copyright (c) 1970-2003, Wm. Randolph Franklin
|
||||
Copyright (c) 2020, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
Copyright (c) 2020-2021, by Matvey Cherevko (blackmatov@gmail.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
|
||||
Reference in New Issue
Block a user