[Webkit-unassigned] [Bug 205943] New: JSArrayBufferView.h: Multiplication result converted to larger type
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Jan 8 11:42:47 PST 2020
https://bugs.webkit.org/show_bug.cgi?id=205943
Bug ID: 205943
Summary: JSArrayBufferView.h: Multiplication result converted
to larger type
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: JavaScriptCore
Assignee: webkit-unassigned at lists.webkit.org
Reporter: msaboff at apple.com
Summary:
JSArrayBufferView.h: Multiplication result converted to larger type: Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
static size_t sizeOf(uint32_t length, uint32_t elementSize)
{
return (length * elementSize + sizeof(EncodedJSValue) - 1)
Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.
& ~(sizeof(EncodedJSValue) - 1);
}
fix: cast length to size_t before multiplication.
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20200108/acb48ec6/attachment.htm>
More information about the webkit-unassigned
mailing list