Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(530)

Issue 2170693003: Fix integer over flow issue in HTMLCanvasElement::canCreateImageBuffer (Closed)

Created:
4 years, 5 months ago by xidachen
Modified:
4 years, 5 months ago
Reviewers:
Justin Novosad
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, dglazkov+blink, Rik, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix integer over flow issue in HTMLCanvasElement::canCreateImageBuffer Right now in this method, it does a size.width() * size.height(), and that could cause integer overflow. This CL fix that by using CheckedNumeric<int>. BUG=630024 Committed: https://crrev.com/29622ffb0f2116f242bcddb38aec7a9100dda7ea Cr-Commit-Position: refs/heads/master@{#406914}

Patch Set 1 #

Patch Set 2 : use CheckedNumeric #

Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -1 line) Patch
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 1 chunk +3 lines, -1 line 0 comments Download

Messages

Total messages: 20 (13 generated)
xidachen
PTAL
4 years, 5 months ago (2016-07-21 13:47:03 UTC) #2
Justin Novosad
On 2016/07/21 13:47:03, xidachen wrote: > PTAL Prefer this: #include "base/numerics/safe_math.h" (...) CheckedNumeric<int> area = ...
4 years, 5 months ago (2016-07-21 15:35:58 UTC) #3
xidachen
On 2016/07/21 15:35:58, Justin Novosad wrote: > On 2016/07/21 13:47:03, xidachen wrote: > > PTAL ...
4 years, 5 months ago (2016-07-21 15:45:34 UTC) #4
Justin Novosad
lgtm
4 years, 5 months ago (2016-07-21 15:52:47 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2170693003/20001
4 years, 5 months ago (2016-07-21 18:29:23 UTC) #16
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-07-21 18:36:18 UTC) #18
commit-bot: I haz the power
4 years, 5 months ago (2016-07-21 18:37:33 UTC) #20
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/29622ffb0f2116f242bcddb38aec7a9100dda7ea
Cr-Commit-Position: refs/heads/master@{#406914}

Powered by Google App Engine
This is Rietveld 408576698