]> granicus.if.org Git - php/commit
Fix #44618: Fetching may rely on uninitialized data
authorChristoph M. Becker <cmbecker69@gmx.de>
Thu, 29 Oct 2020 10:52:10 +0000 (11:52 +0100)
committerChristoph M. Becker <cmbecker69@gmx.de>
Thu, 29 Oct 2020 10:59:12 +0000 (11:59 +0100)
commitc21e901ba735e927e345b65a35fcd6f585d0c2f3
tree354dae192cb27de6b6b96250ab3b7ebcc6699e5e
parent7817fc07e150620be38a16dd29e50c71e51948a7
Fix #44618: Fetching may rely on uninitialized data

Unless `SQLGetData()` returns `SQL_SUCCESS` or `SQL_SUCCESS_WITH_INFO`,
the `StrLen_or_IndPtr` output argument is not guaranteed to be properly
set.  Thus we handle retrieval failure other than `SQL_ERROR` by
yielding `false` for those column values and raising a warning.

Closes GH-6281.
NEWS
ext/odbc/php_odbc.c
ext/odbc/tests/bug44618.phpt [new file with mode: 0644]