Commit Graph

14002 Commits

Author SHA1 Message Date
Pierrick Charron
91db3a1b85
Fixed bug GH-10270 Unable to return CURL_READFUNC_PAUSE in readfunc callback
Closes GH-10607

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-24 14:32:23 +00:00
George Peter Banyard
5f357f341d
Fix GH-10672 (pg_lo_open segfaults in the strict_types mode)
We need to use the proper ZPP qualifier for zend_string

Closes GH-10677
2023-02-24 14:31:23 +00:00
Daniil Gentili
8d1c0a1403
Fix segfault when using ReflectionFiber (fixes #10439)
Closes GH-10478
2023-02-23 23:20:27 +01:00
Niels Dossche
c510083c8c Fix incorrect string length for output_handler in zlib ini code
The length of "output_handler" is supposed to be passed, but as sizeof
is used, the resulting number includes the NUL character, so the length
is off-by-one. Subtract one to pass the correct length.

Closes GH-10667.
2023-02-23 18:47:26 +00:00
NathanFreeman
0a466e7ad8 Fix GH-10647: Spoofchecker isSuspicious/areConfusable methods
error code's argument.

Closes GH-10653.
2023-02-21 21:00:49 +00:00
nielsdos
da3ce6015d Propagate errors correctly in ps_files_cleanup_dir()
In SessionHandler::gc, we use a virtual call to PS(default_mod)->s_gc to
call the gc implementation. That return value is checked against
FAILURE (-1).
One of the call targets of PS(default_mod)->s_gc is ps_gc_files().
ps_gc_files() calls to ps_files_cleanup_dir(). The latter function has
some error checks and outputs a notice if something goes wrong. In cases
of errors, the function returns 0. This means that the check in
SessionHandler::gc will misinterpret this as a success and report that 0
files have been *successfully* cleaned up. Fix it by returning -1 to
indicate something *did* go wrong.

Closes GH-10644.
2023-02-21 16:09:22 +00:00
ndossche
8cac8306c3
Fix incorrect error check in browsecap for pcre2_match()
pcre2_match() returns error codes < 0, but only the "no match" error
code was handled. Fix it by changing the check to >= 0.

Closes GH-10632

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-21 14:13:13 +00:00
ndossche
f592f75e9c
Add missing error check on tidyLoadConfig
Parse errors were not reported for the default config, they were only
reported when explicitly another config was loaded.
This means that users may not be aware of errors in their configuration
and therefore the behaviour of Tidy might not be what they intended.
This patch fixes that issue by using a common function. In fact, the
check for -1 might be enough for the current implementation of Tidy, but
the Tidy docs say that any value other than 0 indicates an error.
So future errors might not be caught when just using an error code of -1.
Therefore, this also changes the error code checks of == -1 to < 0 and
== 1 to > 0.

Closes GH-10636

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-21 14:12:17 +00:00
Niels Dossche
ed0c0df351
Fix GH-10627: mb_convert_encoding crashes PHP on Windows
Fixes GH-10627

The php_mb_convert_encoding() function can return NULL on error, but
this case was not handled, which led to a NULL pointer dereference and
hence a crash.

Closes GH-10628

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-20 13:33:11 +00:00
Max Kellermann
243865ae57
ext/mbstring: fix new_value length check
Commit 8bbd0952e5 added a check rejecting empty strings; in the
merge commiot 379d9a1cfc however it was changed to a NULL check,
one that did not make sense because ZSTR_VAL() is guaranteed to never
be NULL; the length check was accidently removed by that merge commit.

This bug was found by GCC's -Waddress warning:

 ext/mbstring/mbstring.c:748:27: warning: the comparison will always evaluate as ‘true’ for the address of ‘val’ will never be NULL [-Waddress]
   748 |         if (!new_value || !ZSTR_VAL(new_value)) {
       |                           ^

Closes GH-10532

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-02-20 13:32:56 +00:00
Niels Dossche
ae16471628 Fix GH-10623: ReflectionFunction::getClosureUsedVariables() returns empty array in presence of variadic arguments
The code was missing the handling for the RECV_VARIADIC instruction.
Additional regression test for GH-10623

Co-authored-by: Fabio Ivona <fabio.ivona@defstudio.it>
2023-02-19 20:18:28 +00:00
Jakub Zelenka
a9e4f51844
Update NEWS with scanner and parser build fixes 2023-02-17 16:37:14 +00:00
Ilija Tovilo
7b68ff46da
Revert "Fix GH-10168: heap-buffer-overflow at zval_undefined_cv"
This reverts commit 71ddede565.
2023-02-16 14:07:17 +01:00
Niels Dossche
e35e6dc351
[ci skip] NEWS (#10586) 2023-02-14 20:27:29 +01:00
Jakub Zelenka
4058d20608
Merge branch 'PHP-8.0' into PHP-8.1 2023-02-14 10:52:17 +00:00
Jakub Zelenka
937b1e38e2
Fix missing colon in NEWS 2023-02-14 10:46:48 +00:00
Jakub Zelenka
eef29d434a
Change NEWS for GHSA-54hq-v5wp-fqgv as it is for all SAPIs 2023-02-14 10:42:40 +00:00
Jakub Zelenka
caaaf75990
Fix incorrect character in NEWS 2023-02-14 10:33:56 +00:00
Jakub Zelenka
054c7b09f9 Update NEWS 2023-02-14 10:23:59 +00:00
Ben Ramsey
28d68f5013
PHP-8.1 is now for PHP 8.1.17-dev 2023-02-13 13:16:07 -06:00
Arnaud Le Blanc
d721dcc2ef Fix colletion of unfinished function call in fibers
Fixes GH-10496.

Co-authored-by: Bob Weinand <bobwei9@hotmail.com>
2023-02-13 13:09:04 +01:00
Stanislav Malyshev
b5ccaaf613 Update NEWS 2023-02-12 21:04:31 -07:00
Stanislav Malyshev
af2ddc6426 Update NEWS 2023-02-12 20:53:06 -07:00
George Peter Banyard
704aadd098
Fix memory leaks in ext-tidy
We must not instantiate the object prior checking error conditions
Moreover, we need to release the HUGE amount of memory for files which are over 4GB when throwing a ValueError

Closes GH-10545
2023-02-10 14:12:23 +00:00
Max Kellermann
8c8a38a75c ext/curl: suppress -Wdeprecated-declarations
Closes GH-10531.
2023-02-08 18:32:13 +00:00
Niels Dossche
71ddede565
Fix GH-10168: heap-buffer-overflow at zval_undefined_cv
The problem is that we're using the variable_ptr in the opcode handler
*after* it has already been destroyed. The solution is to create a
specialised version of zend_assign_to_variable which takes in two
destination zval pointers.

Closes GH-10524
2023-02-08 01:06:50 +01:00
Ben Ramsey
ba282f1b2f
Update NEWS 2023-02-07 09:28:50 -06:00
Niels Dossche
49551d7c29 Sync boost/context assembly files for fibers
Fixes GH-10398

The stack was misaligned upon entering the trampoline function [1], this
causes a CPU trap when the SSE instruction is executed to copy data from
the stack. This was fixed upstream [2]. This commit syncs all upstream
changes from the boost/context assembly files to our copy.

[1] https://github.com/php/php-src/pull/10407#issuecomment-1404180877
[2] https://github.com/boostorg/context/pull/219

Closes GH-10407.
2023-02-05 16:40:54 +00:00
Niels Dossche
5b13e83074
Fix GH-10385: FPM successful config test early exit
This introduces an enum `fpm_init_return_status` to propagate the status
up to fpm_main. This also makes the code clearer by not using magic
integer return numbers.

Closes GH-10388
2023-02-05 13:07:29 +00:00
Jakub Zelenka
4199b72c50
Fix GH-10315: FPM unknown child alert not valid
This changes the log level for an unknown child during wait as this is
not unuasual if FPM master has pid 1 and also possible in some cases
for higher pid processes. Based on that and the fact that this is not
really a problem, there is just a debug level message emitted for pid 1
and for higher pid a warning is emitted.

Closes GH-10319
2023-02-05 12:36:02 +00:00
Tyson Andre
fe2dc2b481
Avoid crash for reset/end/next/prev() on ffi classes (#9711)
(And any PECLs returning `zend_empty_array` in the handler->get_properties
overrides)

Closes GH-9697

This is similar to the fix used in d9651a9419
for array_walk.

This should make it safer for php-src (and PECLs, long-term) to return
the empty immutable array in `handler->get_properties` to avoid wasting memory.
See https://github.com/php/php-src/issues/9697#issuecomment-1273613175

The only possible internal iterator position for the empty array is at the end
of the empty array (nInternalPointer=0).
The `zend_hash*del*` helpers will always set nInternalPointer to 0 when an
array becomes empty,
regardless of previous insertions/deletions/updates to the array.
2023-02-03 09:17:33 -05:00
Derick Rethans
d17175cb08 Merge remote-tracking branch 'derickr/GH-10447-p-format-specifier' into PHP-8.1 2023-01-31 12:59:39 +00:00
Niels Dossche
ec4939b170
Fix incorrect check in phar tar parsing
The entry.flags was used to check whether the entry has the directory
flag. The flags however were masked to only contain the permissions. We
need to check the mode, before the permission masking, instead of the
flags to check whether it is a directory.

Closes GH-10464

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-29 17:14:12 +00:00
Aaron Piotrowski
284c29328e
Fix GH-10437: Set active fiber to null on bailout (#10443) 2023-01-28 10:13:58 -06:00
Arnaud Le Blanc
a24ac59e55 [ci skip] NEWS 2023-01-27 19:36:28 +01:00
Niels Dossche
a8c8fb2564
Fix incorrect check in cs_8559_5 in map_from_unicode()
The condition `code == 0x0450 || code == 0x045D` is always false because
of an incorrect range check on code.
According to the BMP coverage in the encoding spec for ISO-8859-5
(https://encoding.spec.whatwg.org/iso-8859-5-bmp.html) the range of
valid characters is 0x0401 - 0x045F (except for 0x040D, 0x0450, 0x045D).
The current check has an upper bound of 0x044F instead of 0x045F.
Fix this by changing the upper bound.

Closes GH-10399

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-25 00:08:28 +00:00
Niels Dossche
b7a158a19b
Fix incorrect page_size check
The current check always evaluated to false because if `!page_size`
is true, then `page_size & (page_size - 1)` equals `0 & (0 - 1)` which
is always 0. The if condition is meant to check if page_size is zero or
not a power of two, thus we must change the AND to an OR to fix this
issue.

Closes GH-10427

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-25 00:06:56 +00:00
Niels Dossche
40da9961f2
[ci skip] NEWS (#10442) 2023-01-24 23:19:21 +01:00
Máté Kocsis
3197104e85
Fix GH-10292 1st param of mt_srand() has UNKNOWN default on PHP <8.3
Closes GH-10429
2023-01-24 19:05:33 +01:00
Arnaud Le Blanc
f6734495f7 [ci skip] NEWS 2023-01-20 16:47:36 +01:00
Niels Dossche
b5e9bf7775
Fix incorrect check condition in ZEND_YIELD
The condition `UNEXPECTED(Z_TYPE_P(key)) == IS_REFERENCE` always
returned false, because `UNEXPECTED(expression)` always returns 0 or 1.
Move the parens so the comparison is executed properly.

Closes GH-10332.
2023-01-18 16:23:38 +01:00
Patrick Allaert
c47a1a260d
PHP-8.1 is now for PHP 8.1.16-dev 2023-01-17 17:24:25 +01:00
Niels Dossche
7463e70b1e
Handle exceptions from __toString in XXH3's initialization
The initialization routine for XXH3 was not prepared for exceptions from seed.
Fix this by using try_convert_to_string.

For discussion, please see: GH-10305

Closes GH-10352

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-17 14:14:12 +00:00
Niels Dossche
398a10a58a
Fix phpdbg segmentation fault in case of malformed input
If you were to enter "w $>" the function would crash with a segmentation
fault because last_index is still NULL at that point. Fix it by checking
for NULL and erroring out if it is.

Closes GH-10353

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-17 14:12:49 +00:00
Niels Dossche
dfe9c2af19 Fix incorrect comparison in block optimization pass
We're in the case of ZEND_JMPZ_EX or ZEND_JMPNZ_EX. The opcode gets
overwritten and only after the overwriting gets checked if we're in a
JMPZ or JMPNZ case. This results in a wrong optimization.

Close GH-10329
2023-01-16 20:41:33 +00:00
Niels Dossche
347b7c3628
Fix wrong flags check for compression method in phar_object.c
I found this issue using static analysis tools, it reported that the condition was always false.
We can see that flags is assigned in the switch statement above, but a mistake was made in the comparison.

Closes GH-10328

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-15 15:35:35 +00:00
Niels Dossche
11a1feb0d7
Fix missing check for xmlTextWriterEndElement
xmlTextWriterEndElement returns -1 if the call fails. There was already
a check for retval, but the return value wasn't assigned to retval. The
other caller of xmlTextWriterEndElement is in
xmlwriter_write_element_ns, which does the check correctly.

Closes GH-10324

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-15 15:34:43 +00:00
Niels Dossche
4bbbe6d652
Fix substr_replace with slots in repl_ht being UNDEF
The check that was supposed to check whether the array slot was UNDEF
was wrong and never triggered. This resulted in a replacement with the
empty string or the wrong string instead of the correct one. The correct
check pattern can be observed higher up in the function's code.

Closes GH-10323

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-15 15:31:34 +00:00
Jakub Zelenka
120aafcc42
Fix bug #67244: Wrong owner:group for listening unix socket
Update FPM www.conf to reflect the actual logic
2023-01-13 10:31:01 +00:00
Niels Dossche
833b45ac44 Fix GH-10249: Assertion `size >= page_size + 1 * page_size' failed.
Co-authored-by: Changochen <changochen1@gmail.com>

Closes GH-10284
2023-01-12 22:00:00 +00:00
Derick Rethans
d12ba111e0 Fixed GH-10218: DateTimeZone fails to parse time zones that contain the "+" character 2023-01-10 15:15:49 +00:00
Niels Dossche
d03025bf59 Fix GH-10251: Assertion `(flag & (1<<3)) == 0' failed.
zend_get_property_guard previously assumed that at least "str" has a
pre-computed hash. This is not always the case, for example when a
string is created by bitwise operations, its hash is not set. Instead of
forcing a computation of the hashes, drop the hash comparison.

Closes GH-10254

Co-authored-by: Changochen <changochen1@gmail.com>

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-08 16:09:59 +00:00
Niels Dossche
8ff2b6abb2 Fix GH-9710: phpdbg memory leaks by option "-h"
Closes GH-10237

Signed-off-by: George Peter Banyard <girgias@php.net>
2023-01-08 16:07:00 +00:00
Alex Dowad
3152b7b26f Use different mblen_table for different SJIS variants 2023-01-06 14:09:43 +02:00
Ben Ramsey
275bf3beae
Update NEWS 2023-01-04 00:08:46 -06:00
Gabriel Caruso
c2737b40d7
[ci skip] Next release will be 8.0.28 2023-01-03 11:39:21 -03:00
Gabriel Caruso
4ce48e9a39
[ci skip] Prepare for PHP 8.0.27 GA 2023-01-03 11:36:20 -03:00
Niels Dossche
4c9375e504 Fix GH-10187: Segfault in stripslashes() with arm64
Closes GH-10188

Co-authored-by: todeveni <toni.viemero@iki.fi>
Signed-off-by: George Peter Banyard <girgias@php.net>
2022-12-30 16:40:56 +00:00
George Peter Banyard
c2b0be5570 Fix memory leak in posix_ttyname()
Closes GH-10190
2022-12-30 16:24:28 +00:00
Niels Dossche
3a44c78f14 Fix null pointer dereference of param
When the validation logic for param->type was added, the logic did not
account for the case where param could be NULL. The existing code did
take that into account as can be seen in the `if (param)` check below.
Furthermore, phpdbg_set_breakpoint_expression even calls
phpdbg_create_conditional_break with param == NULL.

Fix it by placing the validation logic inside a NULL check.
2022-12-30 06:53:28 +00:00
Max Kellermann
e217138b40 ext/opcache/jit/zend_jit_trace: add missing lock for EXIT_INVALIDATE
Commit 6c25413183 added the flag ZEND_JIT_EXIT_INVALIDATE which
resets the trace handlers in zend_jit_trace_exit(), but forgot to
lock the shared memory section.

This could cause another worker process who still saw the
ZEND_JIT_TRACE_JITED flag to schedule ZEND_JIT_TRACE_STOP_LINK, but
when it arrived at the ZEND_JIT_DEBUG_TRACE_STOP, the handler was
already reverted by the first worker process and thus
zend_jit_find_trace() fails.

This in turn generated a bogus jump offset in the JITed code, crashing
the PHP process.
2022-12-29 12:20:56 +00:00
Max Kellermann
b26b758952 ext/opcache/jit: handle zend_jit_find_trace() failures
Commit 6c25413 added the flag ZEND_JIT_EXIT_INVALIDATE which resets
the trace handlers in zend_jit_trace_exit(), but forgot to consider
that on ZEND_JIT_TRACE_STOP_LINK, this changed handler gets passed to
zend_jit_find_trace(), causing it to fail, either by returning 0
(results in bogus data) or by aborting due to ZEND_UNREACHABLE().  In
either case, this crashes the PHP process.

I'm not quite sure how to fix this multi-threading problem properly;
my suggestion is to just fail the zend_jit_trace() call.  After all,
the whole ZEND_JIT_EXIT_INVALIDATE fix was about reloading modified
scripts, so there's probably no point in this pending zend_jit_trace()
call.
2022-12-26 21:17:19 +00:00
Jakub Zelenka
a3891d9d1a
Fix GH-9981: FPM does not reset fastcgi.error_header 2022-12-25 14:44:25 +00:00
Derick Rethans
29926c3262 Merge remote-tracking branch 'derickr/gh10072-execute-ex' into PHP-8.1 2022-12-23 16:36:31 +00:00
Niels Dossche
5f1311a92c Fix undefined behaviour in phpdbg_load_module_or_extension
If zend_register_module_ex were to return NULL, then module_entry will
be set to NULL, and the if's body will load module_entry->name. Since
module_entry is NULL, loading the name would cause a NULL pointer
dereference. However, since a NULL pointer dereference is undefined
behaviour, the compiler is free to remove the check.
Fix it by using *name instead of module_entry->name.

Closes GH-10157

Signed-off-by: George Peter Banyard <girgias@php.net>
2022-12-23 13:55:50 +00:00
Niels Dossche
c4487b7a12
Initialize ping_auto_globals_mask to prevent undefined behaviour
Closes GH-10121
2022-12-22 14:59:24 +01:00
Arnaud Le Blanc
6de376a2b4 [ci skip] NEWS 2022-12-21 14:55:21 +01:00
Derick Rethans
d19a70c9a0 Fix GH-9891: DateTime modify with unixtimestamp (@) must work like setTimestamp 2022-12-20 14:41:13 +00:00
Stanislav Malyshev
05c35137cd Add NEWS 2022-12-18 23:24:53 -07:00
Christoph M. Becker
b8ac2071b8
Fix GH-10112: LDAP\Connection::__construct() refers to ldap_create()
There is no `ldap_create()`, but rather `ldap_connect()`.

Closes GH-10115.
2022-12-16 14:36:30 +01:00
Tyson Andre
7a983e281c
Fix Windows shmget() wrt. IPC_PRIVATE
Fixes #9944

https://man7.org/linux/man-pages/man2/shmget.2.html notes

   The name choice IPC_PRIVATE was perhaps unfortunate, IPC_NEW
   would more clearly show its function.

Closes GH-9946.
2022-12-13 15:46:40 +01:00
Christoph M. Becker
aef7d810d3
Fix GH-9949: Partial content on incomplete POST request
`ap_get_brigade()` may fail for different reasons, and we must not
pretend that a partially read POST payload is fine; instead we report
a content length of zero what matches all other `read_post()` callbacks
of bundled SAPIs.

Closes GH-10059.
2022-12-13 15:21:42 +01:00
Ben Ramsey
696bb385df
PHP-8.1 is now for PHP 8.1.15-dev 2022-12-07 11:29:37 -06:00
Christoph M. Becker
2f6b9e6c63
Fix #81742: open_basedir bypass in SQLite3 by using file URI
A previous fix[1] was not sufficient to catch all potential file URIs,
because the patch did not cater to URL encoding.  Properly parsing and
decoding the URI may yield a different result than the handling of
SQLite3, so we play it safe, and reject any file URIs if open_basedir
is configured.

[1] <https://bugs.php.net/bug.php?id=77967>

Closes GH-10018.
2022-12-06 15:59:52 +01:00
George Peter Banyard
608ddb0321
Fix GH-10011 (Trampoline autoloader will get reregistered and cannot be unregistered)
There are two issues to resolve:
 1. The FCC is not refetch when trying to unregister a trampoline
 2. Comparing the function pointer of trampolines is meaningless as they are reallocated, thus we need to compare the name of the function

Found while working on GH-8294

Closes GH-10033
2022-12-02 12:47:25 +00:00
蝦米
93592ea743
Fix GH-9769: Misleading error message for unpacking of objects
Only arrays can be unpacked in constant expressions.

Closes GH-9776.
2022-12-02 13:10:59 +01:00
Derick Rethans
d021851171 Fixed GH-9699, GH-9866, and GH-9880 (problems with diff); and GH-9700 (greedy tzid parsing) 2022-11-30 15:47:43 +00:00
Christoph M. Becker
44377c3c70
Fix GH-9971: Incorrect NUMERIC value returned from PDO_Firebird
Dialect 1 databases store and transfer `NUMERIC(15,2)` values as
doubles, which we need to cater to in `firebird_stmt_get_col()` to
avoid `ZEND_ASSUME(0)` to ever be triggered, since that may result
in undefined behavior.

Since adding a regression test would require to create a dialect 1
database, we go without it.

Closes GH-10021.
2022-11-30 12:11:42 +01:00
Jakub Zelenka
500b28ad04
Fix GH-10000: Test failures when OpenSSL compiled with no-dsa 2022-11-25 14:02:03 +00:00
Arnaud Le Blanc
4987e65a70 [ci skip] NEWS 2022-11-25 14:07:30 +01:00
Jakub Zelenka
ce57221376 Fix GH-9064: PHP fails to build if openssl was built with no-ec 2022-11-25 12:49:12 +00:00
Jakub Zelenka
c9c1934ff0
Fix GH-8517: FPM child pointer can be potentially uninitialized
There might be a moment when the child log event is executed after
freeing a child. That could possibly happen if the child output is
triggered at the same as the terminating of the child. Then the output
event could be potentially processed after the terminating event which
would cause this kind of issue.

The issue might got more visible after introducing the log_stream on
a child because it is more likely that this cannot be dereferenced
after free. However it is very hard to reproduce this issue so there
is no test for this.

The fix basically prevents passing a child pointer and instead passes
the child PID and then looks the child up by the PID when it is being
processed. This is obviously slower but it is a safe way to do it and
the slow down should not be hopefully visible in a way that it would
overload a master process.
2022-11-23 11:25:51 +00:00
Jakub Zelenka
1767f32cb6
[ci skip] Fix NEWS FPM entries 2022-11-22 18:47:24 +00:00
Jakub Zelenka
5a4520bc2b
Fix bug #68207: Setting fastcgi.error_header can result in a WARNING 2022-11-22 18:17:16 +00:00
Jakub Zelenka
31b20f1737
Merge branch 'PHP-8.0' into PHP-8.1 2022-11-22 18:02:11 +00:00
Petr Sumbera
72da2b02e2
php-fpm: fix Solaris port events.mechanism
Closes GH-9959.
2022-11-22 18:01:15 +00:00
George Peter Banyard
6fbf81c674
Fix GH-9883 SplFileObject::__toString() reads next line
We need to overwrite the __toString magic method for SplFileObject, similarly to how DirectoryIterator overwrites it
Moreover, the custom cast handler is useless as we define __toString methods, so use the standard one instead.

Closes GH-9912
2022-11-22 12:21:14 +00:00
Christoph M. Becker
2d94ee5f20
Avoid undefined behavior in Windows ftok(3) emulation
`.nFileIndexHigh` is a unsigned 32bit number.  Casting that to `__int64`
and shifting left by 32bits triggers undefined behavior if the most
significant bit of `.nFileIndexHigh` is set.  We could avoid that by
casting to `(__uint64)`, but in that case the whole clause doesn't have
an effect anymore, so we drop it altogether.

Closes GH-9958.
2022-11-18 14:37:00 +01:00
Michael Voříšek
8d65c2fee5
Fix GH-9650: Can't initialize heap: [0x000001e7]
Closes GH-9721.
2022-11-17 14:16:10 +01:00
David Carlier
a4298c14c1 Fix GH-9932: Discards further characters for session name.
As those are converted, it s better to make aware of the code caller of the naming inadequacy.
Closes GH-9940.
2022-11-15 12:27:44 +00:00
Alex Dowad
1562ba5b71 [ci skip] NEWS 2022-11-13 14:40:45 +02:00
Arnaud Le Blanc
73583bb8c0 [ci skip] NEWS 2022-11-13 11:05:12 +01:00
Akama Hitoshi
af68beb16a
[ci skip] Fix GH-9918: License information for xxHash is not included in README.REDIST.BINS file
Closes GH-9919.
2022-11-10 12:37:08 +01:00
Christoph M. Becker
b2186ca7c4
Fix GH-9905: constant() behaves inconsistent when class is undefined
Directly referring to a constant of an undefined throws an exception;
there is not much point in `constant()` raising a fatal error in this
case.

Closes GH-9907.
2022-11-09 15:21:50 +01:00
Sara Golemon
ac508301c9
Bump for 8.0.27 2022-11-08 22:10:29 +00:00
Patrick Allaert
540488c74e
PHP-8.1 is now for PHP 8.1.14-dev 2022-11-08 17:57:34 +01:00
Arnaud Le Blanc
1cd217038e [ci skip] NEWS 2022-11-04 16:01:52 +01:00
Arnaud Le Blanc
1d67e34c49 [ci skip] NEWS 2022-11-04 15:58:07 +01:00
Christoph M. Becker
8bf6266e65
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix potential NULL pointer dereference Windows shm*() functions
2022-11-02 14:53:30 +01:00
Christoph M. Becker
d1c9ff5642
Fix potential NULL pointer dereference Windows shm*() functions
`shm_get()` (not to be confused with `shmget()`) returns `NULL` if
reallocation fails; we need to cater to that when calling the function.

Closes GH-9872.
2022-11-02 14:51:59 +01:00