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

Issue 2424453002: Handle overflow, underflow in XPath substring position, length. (Closed)

Created:
4 years, 2 months ago by dominicc (has gone to gerrit)
Modified:
4 years, 1 month ago
Reviewers:
yosin_UTC9
CC:
blink-reviews, chromium-reviews, dominicc+watchlist_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle overflow, underflow in XPath substring position, length. BUG=634167 Committed: https://crrev.com/047653201597a4e5c3912d8c2c35adaa2ed6e6ec Cr-Commit-Position: refs/heads/master@{#428284}

Patch Set 1 #

Patch Set 2 : Simplify by converting less. #

Patch Set 3 : Make windows happy. #

Total comments: 10

Patch Set 4 : Try direct solution. More tests. #

Total comments: 10

Patch Set 5 : Feedback. #

Total comments: 1

Patch Set 6 : Address nit. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+182 lines, -34 lines) Patch
M third_party/WebKit/Source/core/BUILD.gn View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathExpressionNode.h View 1 2 3 chunks +4 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathFunctions.h View 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathFunctions.cpp View 1 2 3 4 5 2 chunks +42 lines, -26 lines 0 comments Download
A third_party/WebKit/Source/core/xml/XPathFunctionsTest.cpp View 1 2 3 4 1 chunk +126 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathPredicate.h View 3 chunks +3 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/xml/XPathValue.h View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 42 (26 generated)
dominicc (has gone to gerrit)
PTAL This is an interesting one; to *really* test this you need to do a ...
4 years, 2 months ago (2016-10-16 10:33:08 UTC) #14
dominicc (has gone to gerrit)
Oops: .stringValue); -> .stringValue; I was logging the value. The value should be "12345" of ...
4 years, 2 months ago (2016-10-16 10:34:28 UTC) #15
yosin_UTC9
https://codereview.chromium.org/2424453002/diff/40001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/40001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode541 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:541: lo = mid + 1; Note: When |pos| is ...
4 years, 2 months ago (2016-10-17 03:56:01 UTC) #16
dominicc (has gone to gerrit)
Thanks for your review. I'll work through your other feedback but I wanted to share ...
4 years, 2 months ago (2016-10-21 05:28:45 UTC) #17
yosin_UTC9
https://codereview.chromium.org/2424453002/diff/40001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/40001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode541 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:541: lo = mid + 1; On 2016/10/21 at 05:28:45, ...
4 years, 2 months ago (2016-10-21 05:52:03 UTC) #18
dominicc (has gone to gerrit)
PTAL I took another run at handling NaN, etc. explicitly. I realized your code handles ...
4 years, 2 months ago (2016-10-24 02:48:58 UTC) #21
yosin_UTC9
On 2016/10/24 at 02:48:58, dominicc wrote: > PTAL > > I took another run at ...
4 years, 2 months ago (2016-10-24 05:06:37 UTC) #24
yosin_UTC9
https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode537 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:537: static double clip(const double& lo, const double& value, const ...
4 years, 2 months ago (2016-10-24 05:45:36 UTC) #25
yosin_UTC9
https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode537 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:537: static double clip(const double& lo, const double& value, const ...
4 years, 2 months ago (2016-10-24 06:07:42 UTC) #26
yosin_UTC9
https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/60001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode537 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:537: static double clip(const double& lo, const double& value, const ...
4 years, 2 months ago (2016-10-24 06:08:31 UTC) #27
dominicc (has gone to gerrit)
Thank you for the feedback PTAL
4 years, 1 month ago (2016-10-25 04:00:43 UTC) #30
yosin_UTC9
lgtm w/ nit s/clip/clamp/ to follow C++17 https://codereview.chromium.org/2424453002/diff/80001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp File third_party/WebKit/Source/core/xml/XPathFunctions.cpp (right): https://codereview.chromium.org/2424453002/diff/80001/third_party/WebKit/Source/core/xml/XPathFunctions.cpp#newcode537 third_party/WebKit/Source/core/xml/XPathFunctions.cpp:537: static double ...
4 years, 1 month ago (2016-10-25 04:19:41 UTC) #31
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/2424453002/80001
4 years, 1 month ago (2016-10-28 02:07:24 UTC) #35
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/2424453002/100001
4 years, 1 month ago (2016-10-28 02:32:00 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 1 month ago (2016-10-28 04:49:50 UTC) #40
commit-bot: I haz the power
4 years, 1 month ago (2016-10-28 04:52:17 UTC) #42
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/047653201597a4e5c3912d8c2c35adaa2ed6e6ec
Cr-Commit-Position: refs/heads/master@{#428284}

Powered by Google App Engine
This is Rietveld 408576698