History log of /PHP-8.1/ext/pdo_firebird/firebird_statement.c (Results 1 – 25 of 121)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 21e0305f 23-Mar-2023 Niels Dossche <7771979+nielsdos@users.noreply.github.com>

Fix GH-10908: Bus error with PDO Firebird on RPI with 64 bit kernel and 32 bit userland

The alignment of sqldata is in most cases only the basic alignment,
so the code type-puns it to a

Fix GH-10908: Bus error with PDO Firebird on RPI with 64 bit kernel and 32 bit userland

The alignment of sqldata is in most cases only the basic alignment,
so the code type-puns it to a larger type, it *can* crash due to the
misaligned access. This is only an issue for types > 4 bytes because
every sensible system requires an alignment of at least 4 bytes for
allocated data.

Even though this patch uses memcpy, the compiler is smart enough to
optimise it to something more efficient, especially on x86.
This is just the usual approach to solve these alignment problems.

Actually, unaligned memory access is undefined behaviour, so even on x86
platforms, where the bug doesn't cause a crash, this can be problematic.
Furthermore, even though the issue talks about a 64-bit kernel and
32-bit userspace, this doesn't necessarily need to be the case to
trigger this crash.

Test was Co-authored-by: rvk01

Closes GH-10920.

show more ...


# 44377c3c 29-Nov-2022 Christoph M. Becker

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_

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.

show more ...


# a6a13139 07-Jun-2022 Ben Ramsey

Fix #76452: Crash while parsing blob data in firebird_fetch_blob

This reapplies 286162e9b03071c4308e7e92597bca4239f49d89 to the PHP-8.1 (and up)
branches, fixing what might have been cau

Fix #76452: Crash while parsing blob data in firebird_fetch_blob

This reapplies 286162e9b03071c4308e7e92597bca4239f49d89 to the PHP-8.1 (and up)
branches, fixing what might have been caused by a bad merge conflict resolution.

show more ...


Revision tags: php-8.1.7RC1, php-8.1.4RC1, php-8.1.3, php-8.1.2RC1, php-8.1.0, php-7.3.33, php-7.3.32, php-7.3.31, php-7.3.30, php-7.3.29
# bcbf8aa0 30-Apr-2021 Christoph M. Becker

Fix #76450: SIGSEGV in firebird_stmt_execute

We need to verify that the `result_size` is not larger than our buffer,
and also should make sure that the `len` which is passed to
`isc_

Fix #76450: SIGSEGV in firebird_stmt_execute

We need to verify that the `result_size` is not larger than our buffer,
and also should make sure that the `len` which is passed to
`isc_vax_integer()` has a permissible value; otherwise we bail out.

show more ...


# 286162e9 05-May-2021 Christoph M. Becker

Fix #76452: Crash while parsing blob data in firebird_fetch_blob

We need to prevent integer overflow when calling `erealloc()` with
`len+1`.


# 01b3fc03 06-May-2021 KsaR

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as

Update http->https in license (#6945)

1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |

show more ...


Revision tags: php-7.3.28, php-7.3.27, php-7.3.26, php-7.3.26RC1, php-7.3.25, php-7.3.25RC1, php-7.3.24, php-7.3.24RC1
# 5caaf40b 29-Sep-2020 George Peter Banyard

Introduce pseudo-keyword ZEND_FALLTHROUGH

And use it instead of comments


# 128082c8 17-Mar-2021 Christoph M. Becker

Initalize return_value before use

Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.

[1] <https://ci.appveyor.com/project/php/php-src/builds/38267

Initalize return_value before use

Otherwise we likely segfault[1]. We fix the same issue for
PDO_Firebird as well.

[1] <https://ci.appveyor.com/project/php/php-src/builds/38267250/job/6y3ngn1k6ryxx6j3?fullLog=true#L9783>

Closes GH-6785.

show more ...


# caa71003 17-Dec-2020 Nikita Popov

Rewrite PDO result binding

Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allo

Rewrite PDO result binding

Instead of requiring the type to be determined in advance by the
describer function and then requiring get_col to return a buffer
of appropriate type, allow get_col to return an arbitrary zval.
See UPGRADING.INTERNALS for a more detailed description of the
change.

This makes the result fetching simpler, more efficient and more
flexible. The general possibility already existed via the special
PDO_PARAM_ZVAL type, but the usage was very inconvenient and/or
inefficient. Now it's possible to easily implement behavior like
"return int if it fits, otherwise string" and to avoid any kind
of complex management of temporary buffers.

This also fixes bug #40913 (our second highest voted bug of all
time, for some reason). PARAM_LOB result bindings will now
consistently return a stream resource, independently of the used
database driver.

I've tried my best to update all PDO drivers for this change, but
some of the changes may be broken, as I cannot test or even build
some of these drivers (in particular PDO dblib and PDO oci).
Fixes are appreciated -- a working CI setup would be even more
appreciated ;)

show more ...


# cc23fcfc 21-Dec-2020 Nikita Popov

PDO Firebird: Fix uninitialized var warning


Revision tags: php-7.3.23, php-7.3.23RC1, php-7.3.22, php-7.3.22RC1, php-7.3.21, php-7.3.21RC1, php-7.3.20, php-7.3.20RC1, php-7.3.19, php-7.4.7RC1, php-7.3.19RC1, php-7.3.18RC1, php-7.2.30, php-7.3.17, php-7.3.17RC1, php-7.3.18, php-7.3.16, php-7.3.16RC1, php-7.3.15RC1
# 58b17906 03-Feb-2020 Nikita Popov

Apply tidy formatting

Mostly reindent PHP scripts to spaces.


Revision tags: php-7.3.15, php-7.3.14, php-7.3.14RC1, php-7.3.13, php-7.3.13RC1, php-7.2.26RC1, php-7.4.0, php-7.2.25, php-7.3.12, php-7.4.0RC6, php-7.3.12RC1, php-7.2.25RC1, php-7.4.0RC5
# 3fb42a38 25-Oct-2019 Simonov Denis

Add support for Interbase 1 dialect


Revision tags: php-7.1.33, php-7.2.24, php-7.3.11, php-7.4.0RC4, php-7.3.11RC1, php-7.2.24RC1, php-7.4.0RC3
# 5d6e923d 24-Sep-2019 Gabriel Caruso

Remove mention of PHP major version in Copyright headers

Closes GH-4732.


Revision tags: php-7.2.23, php-7.3.10, php-7.4.0RC2, php-7.2.23RC1, php-7.3.10RC1
# 481f8955 10-Sep-2019 Simonov Denis

Request #77863: PDO firebird support type Boolean in input parameters


Revision tags: php-7.4.0RC1, php-7.1.32, php-7.2.22, php-7.3.9, php-7.4.0beta4, php-7.2.22RC1, php-7.3.9RC1, php-7.4.0beta2, php-7.1.31, php-7.2.21, php-7.3.8, php-7.4.0beta1, php-7.2.21RC1, php-7.3.8RC1, php-7.4.0alpha3, php-7.3.7, php-7.2.20, php-7.4.0alpha2, php-7.3.7RC3, php-7.3.7RC2, php-7.2.20RC2, php-7.4.0alpha1, php-7.3.7RC1, php-7.2.20RC1, php-7.2.19, php-7.3.6, php-7.1.30, php-7.2.19RC1, php-7.3.6RC1, php-7.1.29, php-7.2.18, php-7.3.5, php-7.2.18RC1, php-7.3.5RC1, php-7.2.17, php-7.3.4, php-7.1.28, php-7.3.4RC1, php-7.2.17RC1, php-7.1.27, php-7.3.3, php-7.2.16
# a31f4642 26-Feb-2019 Nikita Popov

Allow exceptions in __toString()

RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error excep

Allow exceptions in __toString()

RFC: https://wiki.php.net/rfc/tostring_exceptions

And convert some object to string conversion related recoverable
fatal errors into Error exceptions.

Improve exception safety of internal code performing string
conversions.

show more ...


# ae21dc46 04-May-2019 Christoph M. Becker

Fix memory leak exhibited by bug_aaa.phpt

Since a statement may be executed multiple times, we need to free
already allocated storage for output data before allocating new
storage.


Revision tags: php-7.3.3RC1, php-7.2.16RC1, php-7.2.15, php-7.3.2, php-7.2.15RC1
# 92ac598a 22-Jan-2019 Peter Kokot

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly

Remove local variables

This patch removes the so called local variables defined per
file basis for certain editors to properly show tab width, and
similar settings. These are mainly used by Vim and Emacs editors
yet with recent changes the once working definitions don't work
anymore in Vim without custom plugins or additional configuration.
Neither are these settings synced across the PHP code base.

A simpler and better approach is EditorConfig and fixing code
using some code style fixing tools in the future instead.

This patch also removes the so called modelines for Vim. Modelines
allow Vim editor specifically to set some editor configuration such as
syntax highlighting, indentation style and tab width to be set in the
first line or the last 5 lines per file basis. Since the php test
files have syntax highlighting already set in most editors properly and
EditorConfig takes care of the indentation settings, this patch removes
these as well for the Vim 6.0 and newer versions.

With the removal of local variables for certain editors such as
Emacs and Vim, the footer is also probably not needed anymore when
creating extensions using ext_skel.php script.

Additionally, Vim modelines for setting php syntax and some editor
settings has been removed from some *.phpt files. All these are
mostly not relevant for phpt files neither work properly in the
middle of the file.

show more ...


# 0cf7de1c 30-Jan-2019 Zeev Suraski

Remove yearly range from copyright notice


# 38c337f2 30-Jan-2019 Zeev Suraski

Remove year range from copyright notice


Revision tags: php-7.3.2RC1, php-5.6.40, php-7.1.26, php-7.3.1, php-7.2.14, php-7.2.14RC1, php-7.3.1RC1, php-5.6.39, php-7.1.25, php-7.2.13, php-7.0.33, php-7.3.0, php-7.1.25RC1, php-7.2.13RC1, php-7.3.0RC6, php-7.1.24, php-7.2.12, php-7.3.0RC5, php-7.1.24RC1, php-7.2.12RC1, php-7.3.0RC4
# 902d39a3 13-Oct-2018 Peter Kokot

Trim trailing whitespace in source code files


# 7f6387b5 13-Oct-2018 Peter Kokot

Trim trailing whitespace in source code files


Revision tags: php-7.1.23, php-7.2.11, php-7.3.0RC3, php-7.1.23RC1, php-7.2.11RC1, php-7.3.0RC2, php-5.6.38, php-7.1.22, php-7.3.0RC1, php-7.2.10, php-7.0.32, php-7.1.22RC1, php-7.3.0beta3, php-7.2.10RC1, php-7.1.21, php-7.2.9, php-7.3.0beta2, php-7.1.21RC1, php-7.3.0beta1, php-7.2.9RC1, php-5.6.37, php-7.1.20, php-7.3.0alpha4, php-7.0.31, php-7.2.8, php-7.1.20RC1, php-7.2.8RC1, php-7.3.0alpha3
# 3847a6fc 25-Jun-2018 sim1984

Fix bug #76488 Memory leak when fetching a BLOB field

Add a phpt test


# b6fb5845 05-Jul-2018 Dmitry Stogov

Replace zval_dtor() with specialized destructors


# eb41eba3 03-Jul-2018 Anatol Belski

Remove BOM


# 682ca5fc 03-Jul-2018 Anatol Belski

Fix compilation with Firebird < 3


12345