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

Issue 2596613002: Fix use-after-scope issues with incorrect usage of ManifestParser. (Closed)

Created:
4 years ago by krasin1
Modified:
4 years ago
CC:
chromium-reviews, mlamouri+watch-content_chromium.org, jam, mlamouri+watch-manifest_chromium.org, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix use-after-scope issues with incorrect usage of ManifestParser. ManifestParser accepts references to StringPiece and GURL. In one case, the test passed inline values which went out of scope immediately, and then the parser used the references pointing to a stack space potentially already reused by other local variables. In other case, string was implicitly converted to StringPiece which also went out of scope before Parse call. Both issues are due to the constructor taking references. It's dangerous, and potentially should be changed. The issue was found by AddressSanitizer with use-after-scope check enabled. BUG=649897 TBR=mlamouri@chromium.org Committed: https://crrev.com/9e8006ae521235d3e9bd0f05f3b445ac37066e40 Cr-Commit-Position: refs/heads/master@{#440010}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -4 lines) Patch
M content/renderer/manifest/manifest_manager.cc View 1 chunk +3 lines, -1 line 0 comments Download
M content/renderer/manifest/manifest_parser_unittest.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 14 (10 generated)
krasin1
4 years ago (2016-12-20 22:12:51 UTC) #2
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/2596613002/1
4 years ago (2016-12-21 04:08:10 UTC) #9
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years ago (2016-12-21 04:15:07 UTC) #12
commit-bot: I haz the power
4 years ago (2016-12-21 04:18:47 UTC) #14
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/9e8006ae521235d3e9bd0f05f3b445ac37066e40
Cr-Commit-Position: refs/heads/master@{#440010}

Powered by Google App Engine
This is Rietveld 408576698