mirror of
https://github.com/reactos/syzkaller.git
synced 2024-11-23 03:19:51 +00:00
pkg/ast: fix out-of-bounds access
Scanner can access data out of bounds on bad input. Also fix regression fuzz test to be able to detect the bug.
This commit is contained in:
parent
314ea0c952
commit
3b37734422
@ -279,7 +279,6 @@ func (s *scanner) next() {
|
||||
// Makes lots of things simpler as we always
|
||||
// want to treat EOF as NEWLINE as well.
|
||||
s.ch = '\n'
|
||||
s.off++
|
||||
return
|
||||
}
|
||||
if s.off > len(s.data) {
|
||||
|
@ -202,7 +202,7 @@ type D[e]l`,
|
||||
"E",
|
||||
"#",
|
||||
} {
|
||||
Fuzz([]byte(data))
|
||||
Fuzz([]byte(data)[:len(data):len(data)])
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user