-
Notifications
You must be signed in to change notification settings - Fork 1
Possible index out of bounds in comment parsing code #17
Copy link
Copy link
Open
Description
Code here will panic on input .<!-:
maybe_xml/maybe_xml/src/read/scanner.rs
Lines 117 to 121 in 1005d17
| let peek4 = pos + 3; | |
| if input.len() < peek4 { | |
| return None; | |
| } | |
| match input[peek4] { |
index out of bounds: the len is 4 but the index is 4
Need to use <= as in all similar places. I don't do PR because I'm not sure what your test policy is, and currently I don't have time to write them.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels