php-src/ext/zlib
Christoph M. Becker d94be24f30
Fix GH-16326: Memory management is broken for bad dictionaries
We must not `efree()` `zend_string`s, since they may have a refcount
greater than one, and may even be interned.

We also must not confuse `zend_string *` with `zend_string **`.

And we should play it safe by using `safe_emalloc()` to avoid
theoretical integer overflows.

We also simplify a bit, according to suggestions of @TimWolla.

Closes GH-16335.
2024-10-13 02:28:07 +02:00
..
tests Fix GH-16326: Memory management is broken for bad dictionaries 2024-10-13 02:28:07 +02:00
config0.m4 Normalize comments in *nix build system m4 files 2019-05-12 18:43:03 +02:00
config.w32 Sync leading and final newlines in source code files 2018-10-14 12:56:38 +02:00
CREDITS
php_zlib.def Export gzfwrite() 2021-04-26 12:09:31 +02:00
php_zlib.h Update http->https in license (#6945) 2021-05-06 12:16:35 +02:00
zlib_arginfo.h Add support for validation of missing method synopses (#9491) 2022-09-07 17:40:36 +02:00
zlib_filter.c Merge branch 'PHP-8.0' into PHP-8.1 2022-06-25 07:39:55 +01:00
zlib_fopen_wrapper.c Use memrchr() when available 2021-11-24 16:13:34 +03:00
zlib.c Fix GH-16326: Memory management is broken for bad dictionaries 2024-10-13 02:28:07 +02:00
zlib.stub.php Add support for validation of missing method synopses (#9491) 2022-09-07 17:40:36 +02:00