Mrmaxmeier commented on code in PR #2330:
URL:
https://github.com/apache/datafusion-sqlparser-rs/pull/2330#discussion_r3189403518
##########
src/ast/value.rs:
##########
@@ -577,7 +577,8 @@ impl fmt::Display for EscapeQuotedString<'_> {
// The quote is not escaped.
// Including idx in the range, so the quote at idx
will be printed twice:
// in this call to write_str() and in the next one.
- f.write_str(&self.string[start_idx..=idx])?;
+ let end_idx = idx + ch.len_utf8();
Review Comment:
Sure, I've added a test. Notably though, this crash is not reachable with
normal `sqlparser` usage because `escape_quoted_string` is only called with
ASCII quote chars. I've only encountered this because of my input generation
experiments.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]