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

Issue 2591023004: Fix use-after-scope bug in TextElider. (Closed)

Created:
4 years ago by krasin1
Modified:
4 years ago
Reviewers:
msw
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix use-after-scope bug in TextElider. string.c_str() result was implicitly converted to icu::UnicodeString, a reference to the temp variable was saved (and then used) by icu::BreakIterator at the time when the stack address was already potentially being reused for other local variables. The bug was found by AddressSanitizer with use-after-free check enabled. It's currently being rolled out into Chrome, and this CL is a part of a larger cleanup of existing failures. BUG=649897 Committed: https://crrev.com/ebc675de6100792906c33c0e0be5ba8c78940f3d Cr-Commit-Position: refs/heads/master@{#440263}

Patch Set 1 #

Patch Set 2 : Fix use-after-scope bug in TextElider. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+2 lines, -1 line) Patch
M ui/gfx/text_elider.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 17 (9 generated)
krasin1
4 years ago (2016-12-21 21:41:48 UTC) #2
msw
lgtm; but this code should probably be using base/i18n/break_iterator.h
4 years ago (2016-12-21 21:48:19 UTC) #6
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/2591023004/20001
4 years ago (2016-12-21 21:54:44 UTC) #9
krasin1
On 2016/12/21 21:48:19, msw wrote: > lgtm; but this code should probably be using base/i18n/break_iterator.h ...
4 years ago (2016-12-21 21:55:42 UTC) #10
krasin1
On 2016/12/21 21:55:42, krasin1 wrote: > On 2016/12/21 21:48:19, msw wrote: > > lgtm; but ...
4 years ago (2016-12-21 21:56:02 UTC) #11
msw
On 2016/12/21 21:55:42, krasin1 wrote: > On 2016/12/21 21:48:19, msw wrote: > > lgtm; but ...
4 years ago (2016-12-21 22:11:30 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years ago (2016-12-21 23:36:46 UTC) #15
commit-bot: I haz the power
4 years ago (2016-12-21 23:40:47 UTC) #17
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ebc675de6100792906c33c0e0be5ba8c78940f3d
Cr-Commit-Position: refs/heads/master@{#440263}

Powered by Google App Engine
This is Rietveld 408576698