mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 952810 - Ionmonkey ARM: Fix a corner case, out of bounds array reference, in isNextBranch. r=mjrosenb
This commit is contained in:
parent
653ad3e608
commit
774e60a155
@ -220,9 +220,10 @@ struct BufferSliceTail : public BufferSlice<SliceSize> {
|
||||
isBranch[idx >> 3] |= 1 << (idx & 0x7);
|
||||
}
|
||||
bool isNextBranch() {
|
||||
if (this->nodeSize == InstBaseSize)
|
||||
unsigned int size = this->nodeSize;
|
||||
if (size == InstBaseSize || size >= SliceSize)
|
||||
return false;
|
||||
int idx = this->nodeSize / InstBaseSize;
|
||||
int idx = size / InstBaseSize;
|
||||
return (isBranch[idx >> 3] >> (idx & 0x7)) & 1;
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user