Zlib: Add some protections to the allocator used by zlib (#84604)
authorLevi Broderick <GrabYourPitchforks@users.noreply.github.com>
Fri, 21 Apr 2023 20:56:43 +0000 (13:56 -0700)
committerGitHub <noreply@github.com>
Fri, 21 Apr 2023 20:56:43 +0000 (13:56 -0700)
commita41fd1423289bbdd0e80dba0639113b618012104
tree001afe82270cb4a62b647e59a676263c2b6aeee9
parent11733d55c29f3dacfe6b5df045c276896c862c7b
Zlib: Add some protections to the allocator used by zlib (#84604)

See comments in the allocator files for more information on the protections offered.

Also:
- Normalizes how we detect if we're using zlib or intel-zlib
- Updates pal_zlib includes
- Updates pal_zlib to use calloc instead of malloc
src/native/external/zlib-intel.cmake
src/native/external/zlib.cmake
src/native/libs/System.IO.Compression.Native/CMakeLists.txt
src/native/libs/System.IO.Compression.Native/pal_zlib.c
src/native/libs/System.IO.Compression.Native/zlib_allocator_unix.c [new file with mode: 0644]
src/native/libs/System.IO.Compression.Native/zlib_allocator_win.c [new file with mode: 0644]