Skip to content

Commit

Permalink
Disallow non-ASCII content inside raw byte string
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jun 24, 2023
1 parent 7505e67 commit b272fbe
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,11 @@ fn raw_byte_string(input: Cursor) -> Result<Cursor, Reject> {
Some((_, '\n')) => {}
_ => break,
},
_ => {}
other => {
if !other.is_ascii() {
break;
}
}
}
}
Err(Reject)
Expand Down

0 comments on commit b272fbe

Please sign in to comment.