Skip to content

Conversation

@ndossche
Copy link
Member

Static analysis reports that the bounds check comes after reading the byte from the buffer.
In practice, this is tagged data that loops until the end tag is found and therefore there isn't really a bug. The extra length check is only there for extra hardening.
So we simply silence the static analysers and improve the hardening.

See also https://docwiki.embarcadero.com/InterBase/15/en/Isc_dsql_sql_info()

Static analysis reports that the bounds check comes after reading the
byte from the buffer.
In practice, this is tagged data that loops until the end tag is found
and therefore there isn't really a bug. The extra length check is only
there for extra hardening.
So we simply silence the static analysers and improve the hardening.

See also https://docwiki.embarcadero.com/InterBase/15/en/Isc_dsql_sql_info()
@ndossche ndossche merged commit ce534c6 into php:PHP-8.3 Dec 28, 2025
9 checks passed
ndossche added a commit that referenced this pull request Dec 28, 2025
* PHP-8.3:
  Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
ndossche added a commit that referenced this pull request Dec 28, 2025
* PHP-8.4:
  Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
ndossche added a commit that referenced this pull request Dec 28, 2025
* PHP-8.5:
  Fix GH-19961: Static analysis arrayIndexThenCheck warning in firebird (#20790)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Static analysis arrayIndexThenCheck warning in firebird

2 participants