Skip to content

ext/odbc: fix cond for SQL_NO_TOTAL that led to single byte buffer - #23462

Merged
NattyNarwhal merged 1 commit into
php:PHP-8.5from
NattyNarwhal:gh23443
Sep 26, 2026
Merged

NattyNarwhal merged 1 commit into
php:PHP-8.5from
NattyNarwhal:gh23443

Conversation

@NattyNarwhal

Copy link
Copy Markdown
Member

The ternary condition here was inverted, which could lead to a single byte buffer being used, which is insufficient for anything. Fix it by making the conditionals clearer.

Fixes GH-23443.

@chep6915

Copy link
Copy Markdown

Hi @NattyNarwhal @SakiTakamachi , gentle ping on this one when you have time. I'm the reporter of GH-23443.

I noticed the ALPINE_X64_ASAN_DEBUG_ZTS job failed. It seems to fail at the apk package install step, so it may just be a CI infrastructure issue, but could you take a look and re-run it if needed?

Thanks a lot for working on the fix!

The ternary condition here was inverted, which could lead to a single
byte buffer being used, which is insufficient for anything. Fix it by
making the conditionals clearer.

Fixes phpGH-23443.
@NattyNarwhal

Copy link
Copy Markdown
Member Author

Rebased (accidentally onto master then fixed that, sorry for the noise), I'll let CI run and get approval, then merge

@Girgias Girgias left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems correct.
Saki is currently on leave AFAIK, but better have a fix that might need tweaking if anything else is discovered than keep something fully broken.

@NattyNarwhal
NattyNarwhal merged commit a4c4173 into php:PHP-8.5 Sep 26, 2026
18 checks passed
NattyNarwhal added a commit that referenced this pull request Sep 26, 2026
* PHP-8.6:
  ext/odbc: fix cond for SQL_NO_TOTAL that led to single byte buffer (#23462)
pull Bot pushed a commit to dolfly/php-src that referenced this pull request Sep 26, 2026
* PHP-8.5:
  ext/odbc: fix cond for SQL_NO_TOTAL that led to single byte buffer (php#23462)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

3 participants