| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
bind parameters
Added new flags that allow skipping param_evt(s) that are not used by drivers,
in a backwards and forward compatible manner. Updated the pgsql, mysql, sqlite
and oci drivers to properly use the new flags. I've left out pdo_dblib, which
doesn't have a param_hook, and pdo_firebird, which seems to be using
PARAM_EVT_NORMALIZE in a wrong context (param type vs event type).
|
|
|
|
|
|
|
|
| |
`ITypeInfo_GetIDsOfNames()` is supposed to fail with `E_NOTIMPL` for
out-of-process servers, thus we should not remove the already available
typeinfo of the object in this case.
We also properly free the `byref_vals`.
|
|
|
|
|
|
|
|
| |
`tolower()` returns an `int`, so we must not convert to `char` which
may be `signed` and as such may be subject to overflow (actually,
implementation defined behavior).
Closes GH-6007
|
|
|
|
|
|
|
|
| |
We need to calculate the free size in bytes.
Patch contributed by t-matsuno.
Closes GH-6024
|
|
|
|
|
|
|
| |
Also it fixes test on 32-bit armv7 and x86
- Test unixtojd() function : error conditions [ext/calendar/tests/unixtojd_error1.phpt]
Closes GH-6033
|
|
|
|
| |
chunked"
|
| |
|
|
|
|
|
|
|
|
|
| |
PDO::__construct() fails
PDO driver constructors are throwing PdoException without setting
errorInfo, so create a new reusable function that throws exceptions
for PDO and will also set the errorInfo. Use this function in
pdo_mysql, pdo_sqlite, and pdo_pgsql.
|
|
|
|
|
|
|
|
|
|
| |
Different manufacturer models may come with a
different endianness (motorola/intel) format. In
order to avoid a big refactor and a gigantic lookup
table, this commit simply attempts to switch the
endianness and proceed when values are acceptable.
Closes GH-5849.
|
|
|
|
|
|
|
|
| |
Whether the type library is cached is actually irrelevant here; what
matters is that the symbols are imported, and since these are not
cached, we have to import them for every request. And we cannot cache
the symbols, because the import depends on the current codepage, but
the codepage is a `PHP_INI_ALL` setting.
|
|
|
|
|
|
| |
One branch did not release tmp_replace_entry_str.
Also reduce the scope of some variables.
|
|
|
|
| |
Only return true from dns_get_mx if we actually found any MX record.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
We must not call `zend_list_delete()` in resource closer functions
exposed to userland, because decreasing the refcount there leads to
use-after-free scenarios. In this case, commit 4a42fbb worked for
typical use-cases where `xml_parser_free()` has been called exactly
once for the resource, because there is an internal zval (`->index`)
referencing the same resource which already increased the refcount by
one. However, when `xml_parser_free()` is called multiple times on the
same XML parser resource, the resource would be freed prematurely.
Instead we forcefully close the resource in `xml_parser_free()`. We
also could decrease the refcount of the resource there, but that would
require to call `xml_parser_free()` which is somewhat uncommon, and
would be particularly bad wrt. PHP 8 where that function is a NOP, and
as such doesn't have to be called. So we do no longer increase the
refcount of the resource when copying it to the internal zval, and let
the usualy refcounting semantics take care of the resource destruction.
[1] <http://git.php.net/?p=php-src.git;a=commit;h=4a42fbbbc73aad7427aef5c89974d1833636e082>
|
|
|
|
| |
Closes GH-5940.
|
|
|
|
|
|
|
| |
Fixes the function `next_newline()` in zend_language_scanner.l. The
function now correctly returns a newline_len of 2 for "\r\n".
Closes GH-5944.
|
|
|
|
| |
We're inserting src_zval, so that's what we should addref.
|
| |
|
| |
|
|
|
|
|
| |
Instead of the temporary `rv`, we use the `val_free` which is there for
this purpose.
|
|
|
|
| |
Closes GH-5890.
|
|
|
|
|
|
| |
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
|
|
|
|
|
| |
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
|
| |
|
|
|
|
| |
This reverts commit d5b59b4303642adac91df2c93969a72bc0f5fa7d.
|
|
|
|
|
| |
After resolving reparse points, the path still may be a reparse point;
in that case we have to resolve that reparse point as well.
|
|
|
|
|
|
| |
The file extension to mime type mapping *must* not depend on the file
extension's case for case-insensitive file systems, and *should* not
for case-sensitive file systems.
|
|
|
|
|
|
|
| |
It does not make sense to make assumptions about `PHP_CONFIG_FILE_PATH`
during build time, since that value is never used during run time on
Windows. Since there is no `--with-config-file-path` on Windows
either, we define `PHP_CONFIG_FILE_PATH` as `""`.
|
| |
|
|
|
|
|
|
|
|
|
| |
We must not mix multibyte and wide character strings in the
`COAUTHIDENTITY` structure. Using wide character strings throughout
would have the advantage that the remote connection can be established
regardless of the code page of the server, but that would more likely
break BC, so we just drop the wide character string conversion of the
username.
|
|
|
|
|
|
|
|
| |
- free handle before return result
- cleaned up remaining usage of MAXPACKET
- update dns_get_mx() to use the same approach
Closes GH-5854.
|
|
|
|
| |
Use *_IND macros in a few places in string.c.
|
|
|
|
| |
Closes GH-5807.
|
|
|
|
|
|
| |
We need to remove the iterators even if the array is empty (we
will not create one if the first place, but the array may become
empty after the fact).
|
|
|
|
|
|
| |
In the interest of avoiding side-effects during dumping, I'm
replacing the value with a <constant ast> string instead of
performing an update constant operation.
|
|
|
|
|
| |
open_basedir is only relevant for plain files, so there is no need to
check it for other URL wrappers.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A `BSTR` is similar to a `zend_string`; it stores the length of the
string just before the actual string, and thus the string may contain
NUL bytes. However, `php_com_olestring_to_string()` is supposed to
deal with arbitrary `OLECHAR*`s which may not be `BSTR`s, so we
introduce `php_com_bstr_to_string()` and use it for the only case where
we actually have to deal with `BSTR`s which may contain NUL bytes.
Contrary to `php_com_olestring_to_string()` we return a `zend_string`,
so we can save the re-allocation when converting to a `zval`.
We also cater to `php_com_string_to_olestring()` not being binary safe,
with basically the same fix we did for `php_com_olestring_to_string()`.
|
|
|
|
|
| |
If `ctime` or `asctime` return `NULL`, we must not attempt to copy the
buffer, but rather return `NULL` as well.
|
| |
|
|
|
|
|
|
| |
Don't unnecessarily truncate to milliseconds.
Closes GH-5760.
|
|
|
|
|
|
|
|
|
| |
`atol()` returns a `long` which is not the same as `zend_long` on
LLP64; we use `ZEND_ATOL()` instead.
There is no need for a new test case, since filesize_large.phpt already
tests for that behavior; unfortunately, the FTP test suite relies on
`pcntl_fork()` and therefore cannot be run on Windows.
|
| |
|
|
|
|
|
|
|
| |
Use the same logic for getgrgid_r, getpwnam_r and getpwuid_r
as for getgrnam_r in #75696
Closes GH-5740.
|
|
|
|
| |
Make sure we don't use zresource after the stream has been destroyed.
|
|
|
|
|
|
|
| |
Even if the length of a maker note does not match our expectations
(either because the maker note is corrupted, or because our
expectations do not quite match reality), there is no need to let
parsing fail; we can still go on parsing the other meta information.
|
|
|
|
|
| |
We have to loop over all image pixels to avoid the black border. This
is also done in external libgd in `_gdScaleOneAxis` and `_gdScalePass`.
|
|
|
|
|
|
|
|
| |
The `timercmp()` manpage[1] points out that some systems have a broken
implementation which does not support `>=`. This is definitely the
case for the Windows SDK, which only supports `<` and `>`.
[1] <https://linux.die.net/man/3/timercmp>
|
|
|
|
|
|
| |
While unencrypted connections ignore negative timeouts, SSL/TLS
connections did not special case that, and so always failed due to
timeout.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
If the current character is a line break character, it cannot be a tab
or space character, so we would always fail with an invalid sequence
error. Obviously, these `scan_stat == 4` conditions are meant to be
exclusive.
Furthermore, if `in_pp == NULL || in_left_p == NULL` is true, we hit a
segfault if we are not returning right away. Obviously, the additional
constraints don't make sense, so we remove them.
|
| |
|