GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — sqlite: check null returns from sqlite value functions by ndossche · Pull Request #63288 · nodejs/node Conversation
|
|
Review requested:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #63288 +/- ## ========================================== - Coverage 90.30% 90.29% -0.01% ========================================== Files 759 759 Lines 247754 247754 Branches 46716 46720 +4 ========================================== - Hits 223724 223719 -5 - Misses 15483 15512 +29 + Partials 8547 8523 -24
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@ndossche Can you please rebase and force push? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
sqlite3_column_text() can return nullptr on failure which was not handled. sqlite3_column_blob() can return nullptr for zero-length BLOBs, which is then passed to memcpy() which is UB. Avoid this by checking for a nullptr. Signed-off-by: ndossche <[email protected]>
|
Done, CI (so far) is looking okay |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Can you add some regression tests? Ones which fail in main, but succeed with the fix? |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Apparently the current test suite can already trigger the "UB blob" problem, but the test runner ignores UBSAN failures, so you never see this as a failure. As for the allocation failure in |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 330f7b5 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
sqlite3_column_text() can return nullptr on failure which was not handled. sqlite3_column_blob() can return nullptr for zero-length BLOBs, which is then passed to memcpy() which is UB. Avoid this by checking for a nullptr. Signed-off-by: ndossche <[email protected]> PR-URL: #63288 Reviewed-By: Trivikram Kamat <[email protected]>
sqlite3_column_text() can return nullptr on failure which was not handled. sqlite3_column_blob() can return nullptr for zero-length BLOBs, which is then passed to memcpy() which is UB. Avoid this by checking for a nullptr. Signed-off-by: ndossche <[email protected]> PR-URL: #63288 Reviewed-By: Trivikram Kamat <[email protected]>
sqlite3_column_text() can return nullptr on failure which was not handled. sqlite3_column_blob() can return nullptr for zero-length BLOBs, which is then passed to memcpy() which is UB. Avoid this by checking for a nullptr. Signed-off-by: ndossche <[email protected]> PR-URL: #63288 Reviewed-By: Trivikram Kamat <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.