mirror of
https://github.com/golang/go
synced 2024-11-19 07:04:43 -07:00
cmd/gc: fix heap buffer overflow
Fixes #8528. LGTM=rsc R=rsc, r, iant, bradfitz CC=golang-codereviews https://golang.org/cl/128230045
This commit is contained in:
parent
b3d5a695a6
commit
53056c37c2
@ -108,6 +108,9 @@ bvnext(Bvec *bv, int32 i)
|
||||
{
|
||||
uint32 w;
|
||||
|
||||
if(i >= bv->n)
|
||||
return -1;
|
||||
|
||||
// Jump i ahead to next word with bits.
|
||||
if((bv->b[i>>WORDSHIFT]>>(i&WORDMASK)) == 0) {
|
||||
i &= ~WORDMASK;
|
||||
|
Loading…
Reference in New Issue
Block a user