Bug 169098 - Sufficently large timeValue and timeScale arguments to MediaTime will cause wrapping in toTimeScale().
Summary: Sufficently large timeValue and timeScale arguments to MediaTime will cause w...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jer Noble
URL:
Keywords: InRadar
Depends on:
Blocks: 169123
  Show dependency treegraph
 
Reported: 2017-03-02 14:16 PST by Jer Noble
Modified: 2017-03-03 00:27 PST (History)
3 users (show)

See Also:


Attachments
Patch (4.13 KB, patch)
2017-03-02 14:17 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (4.13 KB, patch)
2017-03-02 15:28 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (4.75 KB, patch)
2017-03-02 15:30 PST, Jer Noble
keith_miller: review+
Details | Formatted Diff | Diff
Patch for landing (5.11 KB, patch)
2017-03-02 16:15 PST, Jer Noble
no flags Details | Formatted Diff | Diff
Patch for landing (5.11 KB, patch)
2017-03-02 16:18 PST, Jer Noble
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2017-03-02 14:16:23 PST
Sufficently large timeValue and timeScale arguments to MediaTime will cause wrapping in toTimeScale().
Comment 1 Jer Noble 2017-03-02 14:17:43 PST
Created attachment 303239 [details]
Patch
Comment 2 Jer Noble 2017-03-02 15:28:36 PST
Created attachment 303253 [details]
Patch
Comment 3 Jer Noble 2017-03-02 15:30:01 PST
Created attachment 303254 [details]
Patch
Comment 4 Keith Miller 2017-03-02 15:57:39 PST
Comment on attachment 303254 [details]
Patch

r=me. I believe in the maths.
Comment 5 Jer Noble 2017-03-02 16:15:28 PST
Created attachment 303264 [details]
Patch for landing

Added a couple more tests to ensure that large timeScale values didn\'t cause a overflow.
Comment 6 Jon Lee 2017-03-02 16:16:24 PST
rdar://problem/30812277
Comment 7 Jer Noble 2017-03-02 16:18:13 PST
Created attachment 303265 [details]
Patch for landing

And one more to take care of the Windows EWS warnings about int => uint32_t conversion.
Comment 8 Jer Noble 2017-03-02 16:27:39 PST
Committed r213324: <http://trac.webkit.org/changeset/213324>