Inconsistent/missing checks for sqlite3 APIs
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 40.4k
- Forks
- 8.1k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 96
Description
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:
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
Checked on master branch
Operating System
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in ext/sqlite3/sqlite3.c by auditing the sqlite3_reset and sqlite3_finalize calls, including the locations at lines 1414-1417 and 2101-2103. Compare their checking and throw/warn behavior. Done means the relevant calls are checked consistently and the differing behavior is reconciled.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, sqlite
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100