php-src/ext
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
..
bcmath ext/bcmath: Fixed bug (bcpowmod() with mod = -1 returns 1 when it must be 0) 2024-05-30 15:47:25 +01:00
bz2 Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
calendar Fix GH-16234 jewishtojd overflow on year argument. 2024-10-06 18:07:11 +01:00
com_dotnet Fix out of bound writes to SafeArray data 2024-10-09 21:14:44 +02:00
ctype Merge branch 'PHP-8.1' into PHP-8.2 2023-09-26 21:44:00 +02:00
curl curl: Prevent a CurlMultiHandle from holding onto a CurlHandle if add_handle fails (#16302) 2024-10-09 09:37:13 +02:00
date Backport fix from PHP 8.3: The exception handler already takes care of destroying the return value 2024-09-13 11:04:45 +01:00
dba Use pattern tags for NDBM ext/dba/tests (#14755) 2024-07-01 22:06:10 +02:00
dl_test Merge branch 'PHP-8.1' into PHP-8.2 2023-11-03 17:17:23 +00:00
dom Fix GH-16316: DOMXPath breaks when not initialized properly 2024-10-10 19:28:20 +02:00
enchant
exif Use __DIR__-relative path in tests 2023-11-22 20:39:29 -06:00
ffi Fix GH-14286 (ffi enum type (when enum has no name) make memory leak) 2024-07-22 17:44:47 +02:00
fileinfo Fix GH-15752: finfo_file() - parameter validation error messages 2024-09-05 01:41:15 +01:00
filter Merge branch 'PHP-8.1' into PHP-8.2 2024-06-05 01:10:47 -05:00
ftp Fix compilation of ftp without openssl 2023-12-05 11:55:44 +01:00
gd Fix GH-16322: imageaffine overflow on affine argument. 2024-10-11 19:37:34 +01:00
gettext ext/gettext: dcgettext/dcngettext fix for stable branches. 2024-03-05 18:39:14 +00:00
gmp
hash Fix crash when converting array data for array in shm in xxh3 2024-08-05 22:06:11 +02:00
iconv Fix iconv_open basic test (#15611) 2024-08-28 14:29:49 +02:00
imap Merge branch 'PHP-8.1' into PHP-8.2 2023-07-10 13:34:21 +02:00
intl Fix GH-15087 IntlChar::foldCase()'s $option is not optional 2024-07-24 16:45:20 +02:00
json Merge branch 'PHP-8.1' into PHP-8.2 2023-05-13 18:53:35 +01:00
ldap ext/ldap: Fix GH-16136 (Memory leak in php_ldap_do_modify()) 2024-09-30 22:23:01 +01:00
libxml Update error message for libxml 2.13 2024-09-12 23:06:25 +02:00
mbstring Fix GH-16360 mb_substr overflow on start and length arguments. 2024-10-11 08:46:48 +01:00
mysqli Fix GH-15432: Heap corruption when querying a vector 2024-08-20 15:43:21 +02:00
mysqlnd Fix GH-15432: Heap corruption when querying a vector 2024-08-20 15:43:21 +02:00
oci8 Update year to 2024 2024-01-04 19:26:32 +01:00
odbc Fix odbc_data_source_001.phpt 2024-08-06 16:54:19 +02:00
opcache Fix possible NULL dereference 2024-09-26 15:43:42 +03:00
openssl Fix GH-16357: openssl may modify member types of certificate arrays 2024-10-12 16:05:31 +02:00
pcntl Merge branch 'PHP-8.1' into PHP-8.2 2023-09-22 10:26:01 +02:00
pcre Fix GH-16184: UBSan address overflowed in ext/pcre/php_pcre.c 2024-10-03 21:10:57 +02:00
pdo Fix GH-14712: segfault on invalid object. 2024-06-29 15:51:57 +01:00
pdo_dblib
pdo_firebird Fix bogus fallthrough path in firebird_handle_get_attribute() 2024-07-22 18:33:03 +02:00
pdo_mysql ext/pdo_mysql: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
pdo_oci
pdo_odbc Remove use of SDWORD and SWORD in ODBC extensions (GH-14457) 2024-06-04 12:46:19 -03:00
pdo_pgsql Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
pdo_sqlite Fix GH-14712: segfault on invalid object. 2024-06-29 15:51:57 +01:00
pgsql Revert "Fix GH-13519: PGSQL_CONNECT_FORCE_RENEW with persistent connections." 2024-02-27 23:03:28 +00:00
phar Merge branch 'phar-big-endian-8.2' into PHP-8.2 2024-09-24 02:23:30 -03:00
posix [skip ci] Mark some more macOS tests as flaky 2024-10-13 02:06:57 +02:00
pspell
random Checks getrandom availability on solaris. 2024-08-13 20:50:15 +01:00
readline ext/readline: Fix [-Wcalloc-transposed-args] compiler warning 2024-05-21 12:17:25 +01:00
reflection Fix GH-16187: ReflectionClass::__toString() with packed properties hash table 2024-10-05 10:18:11 +02:00
session Fix GH-16385: Unexpected null returned by session_set_cookie_params 2024-10-12 13:08:37 +02:00
shmop Fix GH-14537: shmop Windows 11 crashes the process 2024-06-28 20:13:47 +02:00
simplexml Fix GH-15837: Segmentation fault in ext/simplexml/simplexml.c 2024-09-11 20:38:38 +02:00
skeleton
snmp
soap Fix GH-16259: Soap segfault when classmap instantiation fails 2024-10-07 17:42:27 +02:00
sockets Fix socket_recvfrom overflow on buffer size. 2024-10-12 15:23:03 +01:00
sodium Fix memory leaks in ext/sodium on failure of some functions 2024-05-23 22:40:28 +02:00
spl Fix GH-16337: Use-after-free in SplHeap 2024-10-12 13:31:23 +02:00
sqlite3 Merge branch 'PHP-8.1' into PHP-8.2 2023-11-10 00:08:09 +01:00
standard Fix array_merge_recursive(): convert_to_array() may need separation (#16061) 2024-10-02 12:37:04 +02:00
sysvmsg
sysvsem
sysvshm
tidy Fix memory leaks in ext/tidy basedir restriction code 2024-07-21 16:28:15 +02:00
tokenizer
xml Fix GH-15868: Assertion failure in xml_parse_into_struct after exception 2024-09-13 19:59:41 +02:00
xmlreader Fix GH-16292: Segmentation fault in ext/xmlreader/php_xmlreader.c:1282 2024-10-08 20:54:07 +02:00
xmlwriter Backport libxml2 2.13.2 fixes (#14816) 2024-07-04 15:29:50 +02:00
xsl Add SKIPIFs for upstream regression in libxslt (#14674) 2024-06-26 19:35:52 +02:00
zend_test Fix GH-16388: UB when freeing a cloned _ZendTestFiber 2024-10-12 22:48:11 +02:00
zip Use EXTENSIONS instead of SKIPIF sections in *.phpt 2024-01-31 11:18:21 +01:00
zlib Fix GH-16326: Memory management is broken for bad dictionaries 2024-10-13 02:28:07 +02:00
ext_skel.php