Bug 131615 - fix potential truncation in x86assembler
Summary: fix potential truncation in x86assembler
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 8
: P2 Trivial
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-14 07:16 PDT by Alex Christensen
Modified: 2014-04-14 09:32 PDT (History)
3 users (show)

See Also:


Attachments
Patch (1.38 KB, patch)
2014-04-14 07:17 PDT, Alex Christensen
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Christensen 2014-04-14 07:16:36 PDT
My solution to https://bugs.webkit.org/show_bug.cgi?id=131508 truncates the size_t (which is a 64-bit integer) to an unsigned (which is a 32-bit integer in Windows) before taking the minimum of it an 15, which could lead to truncation problems.  Truncating after the call to std::min should fix it.
Comment 1 Alex Christensen 2014-04-14 07:17:35 PDT
Created attachment 229281 [details]
Patch
Comment 2 Darin Adler 2014-04-14 08:30:12 PDT
Comment on attachment 229281 [details]
Patch

Yes, this looks better.
Comment 3 WebKit Commit Bot 2014-04-14 09:32:10 PDT
Comment on attachment 229281 [details]
Patch

Clearing flags on attachment: 229281

Committed r167250: <http://trac.webkit.org/changeset/167250>
Comment 4 WebKit Commit Bot 2014-04-14 09:32:13 PDT
All reviewed patches have been landed.  Closing bug.