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

Issue 777143002: Early return when the value of test-justify is distribute, and the length of line is 0 (Closed)

Created:
6 years ago by dw.im
Modified:
6 years ago
CC:
blink-reviews, Rik, danakj, Dominik Röttsches, krit, f(malita), jbroman, pdr+graphicswatchlist_chromium.org, rwlbuis, Stephen Chennney
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Project:
blink
Visibility:
Public.

Description

Early return when the value of test-justify is distribute, and the length of line is 0 There is no expansion opportunity if the length of the line is 0. So, early return for the cases is needed to prevent buffer overflow which detected by ClusterFuzz. This patch is to fix the crash issue which is introduced by https://src.chromium.org/viewvc/blink?view=rev&revision=186099. The test case is created by ClusterFuzz originally, I've tried to simplify it as much as possible. BUG=438618 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=187326

Patch Set 1 #

Patch Set 2 : Early return #

Patch Set 3 : Early return #

Patch Set 4 : Taking care of isAfterExpansion #

Patch Set 5 : With test case #

Total comments: 3

Patch Set 6 : #

Patch Set 7 : #

Total comments: 1

Patch Set 8 : take care of distribute case #

Patch Set 9 : #

Patch Set 10 : patch for landing #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -12 lines) Patch
M LayoutTests/TestExpectations View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
A LayoutTests/fast/css3-text/css3-text-justify/text-justify-crash.html View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/css3-text/css3-text-justify/text-justify-crash-expected.html View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download
A LayoutTests/fast/css3-text/css3-text-justify/text-justify-distribute.html View 1 2 3 4 5 6 7 1 chunk +12 lines, -0 lines 0 comments Download
M Source/platform/fonts/Character.cpp View 1 2 3 4 5 6 7 8 9 1 chunk +19 lines, -12 lines 0 comments Download

Messages

Total messages: 46 (9 generated)
dw.im
PTAL!
6 years ago (2014-12-04 05:50:58 UTC) #2
dw.im
6 years ago (2014-12-04 06:06:58 UTC) #4
pdr.
On 2014/12/04 at 06:08:31, dw.im wrote: > dw.im@samsung.com changed reviewers: > + pdr@chromium.org I don't ...
6 years ago (2014-12-04 06:25:22 UTC) #6
dw.im
On 2014/12/04 06:25:22, pdr wrote: > On 2014/12/04 at 06:08:31, dw.im wrote: > > mailto:dw.im@samsung.com ...
6 years ago (2014-12-04 06:48:45 UTC) #7
pdr.
On 2014/12/04 at 06:48:45, dw.im wrote: > On 2014/12/04 06:25:22, pdr wrote: > > On ...
6 years ago (2014-12-04 06:52:36 UTC) #8
dw.im
On 2014/12/04 06:52:36, pdr wrote: > My guess is that you have an underflow occurring. ...
6 years ago (2014-12-04 09:52:00 UTC) #9
pdr.
On 2014/12/04 at 09:52:00, dw.im wrote: > On 2014/12/04 06:52:36, pdr wrote: > > My ...
6 years ago (2014-12-04 19:35:45 UTC) #11
eae
The change itself looks great, I would however like to see a test case added.
6 years ago (2014-12-04 19:43:24 UTC) #12
dw.im
On 2014/12/04 19:43:24, eae wrote: > The change itself looks great, I would however like ...
6 years ago (2014-12-05 00:29:43 UTC) #13
eae
On 2014/12/05 00:29:43, dw.im wrote: > On 2014/12/04 19:43:24, eae wrote: > > The change ...
6 years ago (2014-12-05 00:34:00 UTC) #14
dw.im
On 2014/12/05 00:34:00, eae wrote: > On 2014/12/05 00:29:43, dw.im wrote: > > On 2014/12/04 ...
6 years ago (2014-12-05 00:41:47 UTC) #15
pdr.
On 2014/12/05 at 00:41:47, dw.im wrote: > On 2014/12/05 00:34:00, eae wrote: > > On ...
6 years ago (2014-12-05 01:37:09 UTC) #16
dw.im
On 2014/12/05 01:37:09, pdr wrote: > touched the sample little bit. PTAL!
6 years ago (2014-12-05 03:03:33 UTC) #17
kojii
https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp File Source/platform/fonts/Character.cpp (right): https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp#newcode345 Source/platform/fonts/Character.cpp:345: isAfterExpansion = false; Why do we need to set ...
6 years ago (2014-12-05 06:23:22 UTC) #19
dw.im
https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp File Source/platform/fonts/Character.cpp (right): https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp#newcode345 Source/platform/fonts/Character.cpp:345: isAfterExpansion = false; On 2014/12/05 06:23:22, koji wrote: > ...
6 years ago (2014-12-05 07:16:42 UTC) #20
kojii
https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp File Source/platform/fonts/Character.cpp (right): https://codereview.chromium.org/777143002/diff/80001/Source/platform/fonts/Character.cpp#newcode345 Source/platform/fonts/Character.cpp:345: isAfterExpansion = false; On 2014/12/05 07:16:42, dw.im wrote: > ...
6 years ago (2014-12-05 13:11:21 UTC) #21
dw.im
On 2014/12/05 13:11:21, koji wrote: > You could also check this function before your last ...
6 years ago (2014-12-08 07:38:46 UTC) #22
dw.im
PTAL!
6 years ago (2014-12-09 00:33:06 UTC) #23
pdr.
On 2014/12/09 at 00:33:06, dw.im wrote: > PTAL! I'm not a text layout expert but ...
6 years ago (2014-12-09 06:19:41 UTC) #24
dw.im
On 2014/12/09 06:19:41, pdr wrote: > On 2014/12/09 at 00:33:06, dw.im wrote: > > PTAL! ...
6 years ago (2014-12-09 06:24:55 UTC) #25
pdr.
On 2014/12/09 at 06:24:55, dw.im wrote: > On 2014/12/09 06:19:41, pdr wrote: > > On ...
6 years ago (2014-12-09 06:36:42 UTC) #26
dw.im
On 2014/12/09 06:36:42, pdr wrote: > So this is a regression from > https://src.chromium.org/viewvc/blink?view=rev&revision=186646? If ...
6 years ago (2014-12-11 05:37:04 UTC) #27
kojii
On 2014/12/11 05:37:04, dw.im wrote: > On 2014/12/09 06:36:42, pdr wrote: > > So this ...
6 years ago (2014-12-11 07:43:27 UTC) #28
pdr.
On 2014/12/11 at 07:43:27, kojii wrote: > On 2014/12/11 05:37:04, dw.im wrote: > > On ...
6 years ago (2014-12-11 07:58:28 UTC) #29
kojii
https://codereview.chromium.org/777143002/diff/120001/Source/platform/fonts/Character.cpp File Source/platform/fonts/Character.cpp (right): https://codereview.chromium.org/777143002/diff/120001/Source/platform/fonts/Character.cpp#newcode350 Source/platform/fonts/Character.cpp:350: return length - 1; I jumped in from the ...
6 years ago (2014-12-11 08:47:36 UTC) #30
dw.im
On 2014/12/11 08:47:36, koji wrote: > It looks like you reverted non-distribute case back to ...
6 years ago (2014-12-12 01:10:07 UTC) #31
kojii
On 2014/12/12 01:10:07, dw.im wrote: > On 2014/12/11 08:47:36, koji wrote: > > > It ...
6 years ago (2014-12-12 01:47:27 UTC) #32
dw.im
On 2014/12/12 01:47:27, koji wrote: > On 2014/12/12 01:10:07, dw.im wrote: > > On 2014/12/11 ...
6 years ago (2014-12-12 02:52:56 UTC) #33
kojii
On 2014/12/12 02:52:56, dw.im wrote: > Yes, the caller need to take care of it, ...
6 years ago (2014-12-12 03:42:38 UTC) #34
dw.im
Regarding chat on IRC with koji, I've added one more layouttest case to check distributed ...
6 years ago (2014-12-12 11:12:44 UTC) #35
kojii
Not an owner but it looks good to me now. eae@, PTAL?
6 years ago (2014-12-15 06:59:26 UTC) #36
eae
LGTM
6 years ago (2014-12-16 22:11:02 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777143002/160001
6 years ago (2014-12-16 22:11:49 UTC) #40
commit-bot: I haz the power
Failed to apply patch for LayoutTests/TestExpectations: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
6 years ago (2014-12-16 22:12:21 UTC) #42
dw.im
On 2014/12/16 22:12:21, I haz the power (commit-bot) wrote: > Failed to apply patch for ...
6 years ago (2014-12-17 00:21:48 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/777143002/180001
6 years ago (2014-12-17 00:53:20 UTC) #45
commit-bot: I haz the power
6 years ago (2014-12-17 03:29:20 UTC) #46
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=187326

Powered by Google App Engine
This is Rietveld 408576698