Fix integer overflow when calculating zeroing range in zeroObject
Lists can have up to 29 bits of elements. We multiply that by a constant of 8 (Bytes per word), so basically any element size can cause on overflow.
This commit is contained in:
parent
58c906f555
commit
04d0692c64
1 changed files with 4 additions and 4 deletions
|
@ -258,7 +258,7 @@ final class WireHelpers {
|
|||
case ElementSize.EIGHT_BYTES: {
|
||||
memset(segment.buffer, ptr * Constants.BYTES_PER_WORD, (byte) 0,
|
||||
roundBitsUpToWords(
|
||||
ListPointer.elementCount(tag) *
|
||||
(long) ListPointer.elementCount(tag) *
|
||||
ElementSize.dataBitsPerElement(ListPointer.elementSize(tag))) * Constants.BYTES_PER_WORD);
|
||||
break;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue