[php-src] Issue #22051: Inconsistent/missing checks for sqlite3 APIs
| From: | ndossche | Date: | Fri, 15 May 2026 12:15:19 +0000 |
| Subject: | [php-src] Issue #22051: Inconsistent/missing checks for sqlite3 APIs | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-252082@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/22051
Author: ndossche
### Description
Several calls to
sqlite3_reset and sqlite3_finalize are unchecked.
Some calls to sqlite3_reset are checked and then the value is returned to the user:
https://github.com/php/php-src/blob/cde32beadeee04c16d8607266ea7586078fbc9df/ext/sqlite3/sqlite3.c#L1414-L1417
https://github.com/php/php-src/blob/cde32beadeee04c16d8607266ea7586078fbc9df/ext/sqlite3/sqlite3.c#L2101-L2103
Note however an inconsistency between these two: one of them throw/warns and the other one
doesn't. This likely needs to be made consistent.
It's probably best if the calls to sqlite3_reset and sqlite3_finalize
are checked consistently everywhere.
Note: found by a static-dynamic hybrid analyzer I'm developing.
### PHP Version
```plain
Checked on master branch
```
### Operating System
N/A