Repository navigation
sqlite: fix abort on oversized SQL text - #67768
Open
christianaurichzm wants to merge 1 commit into
Open
christianaurichzm wants to merge 1 commit into
christianaurichzm wants to merge 1 commit into
Conversation
`expandedSQL`, `sourceSQL`, column names and the `sqlite.db.query` trace callback passed SQL text to `String::NewFromUtf8()` without a length, and V8 aborted on text longer than `String::kMaxLength`. Pass the length instead. The getters and column names now throw `ERR_STRING_TOO_LONG`, and the trace callback skips the event so the statement still runs. Co-authored-by: lazerg <lazerg2@gmail.com> Signed-off-by: Christian Aurich Zanettini Martins <christian.aurichzm@gmail.com>
Collaborator
|
Review requested:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
expandedSQL,sourceSQL, result column names and thesqlite.db.querytrace callback abort the process on SQL text longer thanString::kMaxLengthin UTF-8:With a
sqlite.db.querysubscriber,run()alone aborts too.These call sites pass the text to
String::NewFromUtf8()without a length, and V8 then aborts instead of returning an empty handle. This routes the getters and column names through the helpers that column values already use, so they throwERR_STRING_TOO_LONG. The trace callback passes the length and skips the event on an empty handle.This picks up #66498 by @lazerg.
Fixes: #66487
Refs: #66498