Looking at the strace, the timeout is only 1s which may be too low
anyway for checking for a response, but some servers also don't end up
replying finally anyway and close the connection already.
`data_available` was originally used for non-blocking downloads/uploads
and then reused for the shutdown sequence, but its error handling was
never adjusted to be silent.
Closes GH-20294.
* ftp: Fix weird typo
In 8827f8eca9 the async functions were
renamed to nb functions. So this was just a find+replace of async to nb.
The diff shows that "no asyncronous transfer to continue" was replaced
with "no nbronous transfer to continue". Makes no sense.
* Update ext/ftp/php_ftp.c
Co-authored-by: Jakub Zelenka <bukka@php.net>
---------
Co-authored-by: Jakub Zelenka <bukka@php.net>
We should not free `intern` as its stored in the object store as well,
so the object store will already free it, leading to a UAF when the
object store tries to read the object's fields.
Closes GH-20276.
The FIELD_TYPE constants are for BC. The JSON/VECTOR types are not
defined in FIELD_TYPE for libmysqlclient.
MYSQL_TYPE is available since MYSQL 5.0.0, so switch to that.
Since MYSQL_TYPEs are enums and not defines, we need version checks
instead.
JSON was added in mysql 8.0.0 in mysql/mysql-server@c240455145
JSON support was backported via mysql/mysql-server@3e14f9f in 5.7.8.
VECTOR was added in mysql 9.0.0 in mysql/mysql-server@8cd51511de
Replaces GH-20245.
This fixes incorrect type conversion and subsequent check for Windows
where returned socket is not an int.
It should be noted that this is not really an issue as previous int
would get negative so the check should still work. The issue actually
happens only in master (PHP 8.5) where refactoring has been done and the
type changed.
Closes GH-19881
* Fix Windows test for openssl-3.5 upgrade
* Update ext/openssl/tests/check_default_conf_path.phpt
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
---------
Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>
If the first string conversion fails, then i==0, but memory was still
allocated for `params`. However, we skip freeing `params` when i==0.
Closes GH-20213.
If there are 2 ports, only the first is used.
However, then the certificate checking fails. So we drop the second port
if there is one.
Closes GH-20021.
When `!value_ptr` is handled, memory is allocated at line 3314.
At later exit paths, `outside` (pointing to `value_ptr`) is freed, but
not when exiting via the `REQUIRE_NON_EMPTY` macro.
Closes GH-20169.
* PHP-8.2:
Disable inlining and inter-procedure-analyses for zend_string_equal_val() function that may be overriden for valgrind (#13099)
Skip lc_ctype_inheritance.phpt on macos 15+
* PHP-8.1:
Disable inlining and inter-procedure-analyses for zend_string_equal_val() function that may be overriden for valgrind (#13099)
Skip lc_ctype_inheritance.phpt on macos 15+
The dynamic loader, starting around version 1284, patches the thunk emitted for
thread local variables by the compiler, so that its format changes from
struct Thunk {
void *func;
size_t module;
size_t offset;
}
to
struct Thunk_v2 {
void *func;
uint32_t module;
uint32_t offset;
// other fields
}
which has the same size, but not the same layout.
This is mentionned in
9307719dd8/libdyld/ThreadLocalVariables.h (L90)
As a result, access to thread specific variables in JIT is broken.
Fix by using the new layout when the new dynamic loader is in use.
Closes GH-20121
The PHAR_ZIP_FAIL and PHAR_ZIP_FAIL_FREE macros are almost the same.
The reason the latter exists is because of a single error path where the
error message is on the heap and needs to be freed. Instead, use a stack
allocated variable for the error message so we can get rid of the
duplicate macro code. This stack variable is big enough as the messages
written by phar_verify_signature() are short.
Closes GH-20144.