mirror of
https://gitee.com/openharmony/third_party_rust_proc-macro2
synced 2024-11-27 01:20:48 +00:00
Merge pull request #358 from dtolnay/depth
Fix integer overflow in nested comment parser
This commit is contained in:
commit
46e9bd6b7e
@ -116,7 +116,7 @@ fn block_comment(input: Cursor) -> PResult<&str> {
|
||||
return Err(Reject);
|
||||
}
|
||||
|
||||
let mut depth = 0;
|
||||
let mut depth = 0usize;
|
||||
let bytes = input.as_bytes();
|
||||
let mut i = 0;
|
||||
let upper = bytes.len() - 1;
|
||||
|
Loading…
Reference in New Issue
Block a user