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

Issue 2191253002: Prevent integer overflows in ANPlusB handling (Closed)

Created:
4 years, 4 months ago by meade_UTC10
Modified:
3 years, 9 months ago
Reviewers:
nainar, esprehn
CC:
darktears, apavlov+blink_chromium.org, blink-reviews, blink-reviews-css, chromium-reviews, dglazkov+blink, rwlbuis
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Prevent integer overflows in ANPlusB handling BUG=628874, 628865

Patch Set 1 #

Patch Set 2 : Use cast to long instead of checking #

Patch Set 3 : Remove longs #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -7 lines) Patch
M third_party/WebKit/Source/core/css/CSSSelector.cpp View 2 1 chunk +12 lines, -0 lines 1 comment Download
M third_party/WebKit/Source/core/css/CSSSelectorTest.cpp View 1 2 1 chunk +32 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParser.cpp View 3 chunks +8 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/css/parser/CSSSelectorParserTest.cpp View 3 chunks +9 lines, -3 lines 0 comments Download

Messages

Total messages: 17 (11 generated)
meade_UTC10
4 years, 4 months ago (2016-07-29 07:44:10 UTC) #4
nainar
lgtm
4 years, 4 months ago (2016-07-29 07:51:29 UTC) #5
meade_UTC10
Hey Elliott! Is this a good way to fix these clusterfuzz bugs? Thanks! Eddy
4 years, 4 months ago (2016-08-03 03:22:28 UTC) #12
esprehn
I think doing math on long values is slower, why do we want to fix ...
4 years, 4 months ago (2016-08-03 03:56:50 UTC) #13
esprehn
https://codereview.chromium.org/2191253002/diff/40001/third_party/WebKit/Source/core/css/CSSSelector.cpp File third_party/WebKit/Source/core/css/CSSSelector.cpp (right): https://codereview.chromium.org/2191253002/diff/40001/third_party/WebKit/Source/core/css/CSSSelector.cpp#newcode946 third_party/WebKit/Source/core/css/CSSSelector.cpp:946: if (UNLIKELY(nthAValue() == minInt || count == minInt)) how ...
4 years, 4 months ago (2016-08-15 16:19:24 UTC) #16
meade_UTC10
4 years, 4 months ago (2016-08-16 01:29:38 UTC) #17
On 2016/08/15 16:19:24, esprehn wrote:
>
https://codereview.chromium.org/2191253002/diff/40001/third_party/WebKit/Sour...
> File third_party/WebKit/Source/core/css/CSSSelector.cpp (right):
> 
>
https://codereview.chromium.org/2191253002/diff/40001/third_party/WebKit/Sour...
> third_party/WebKit/Source/core/css/CSSSelector.cpp:946: if
(UNLIKELY(nthAValue()
> == minInt || count == minInt))
> how can count be minInt? count is the index of the element, I think it has to
be
> a positive value. I'm actually not sure why we use int instead of unsigned?

In that case I'll see if I can change it to unsigned.

Powered by Google App Engine
This is Rietveld 408576698