[Webkit-unassigned] [Bug 205947] New: TypeProfiler.h: Multiplication result converted to larger type

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 8 11:52:39 PST 2020


https://bugs.webkit.org/show_bug.cgi?id=205947

            Bug ID: 205947
           Summary: TypeProfiler.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:
TypeProfiler.h: Multiplication result converted to larger type: Multiplication result may overflow 'unsigned int' before it is converted to 'unsigned long'.

    unsigned hash() const 
    { 
        unsigned hash = m_sourceID + m_divot * m_searchDescriptor;
Multiplication result may overflow 'unsigned int' before it is converted to 'long'.
        return hash;
    }

fix: fix cast m_sourceID to unsigned or cast the whole result to unsigned.

-- 
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/3c054529/attachment-0001.htm>


More information about the webkit-unassigned mailing list