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

Issue 1519283002: Fix a use-after-free of SaveFileCreateInfo in SaveFileManager. (Closed)

Created:
5 years ago by Łukasz Anforowicz
Modified:
5 years ago
CC:
chromium-reviews, asanka, darin-cc_chromium.org, rginda+watch_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix a use-after-free of SaveFileCreateInfo in SaveFileManager. For details about the problem see crbug.com/569258. This CL fixes the problem, by avoiding to post a raw pointer and instead posting the SaveFileCreateInfo struct by value. Posting by value is ok, because the target (UI thread) doesn't modify SaveFileCreateInfo (and I tried to make that explicit by retaining the "const" qualifier on the parameter declaration). BUG=569258 Committed: https://crrev.com/5669529aa87b0d38985b592ec08affed7dc6cfdb Cr-Commit-Position: refs/heads/master@{#365053}

Patch Set 1 #

Total comments: 2

Patch Set 2 : Changing parameter declaration to const-ref. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -9 lines) Patch
M content/browser/download/save_file_manager.h View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/download/save_file_manager.cc View 1 3 chunks +8 lines, -7 lines 0 comments Download
M content/browser/download/save_package.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 10 (4 generated)
Łukasz Anforowicz
Randy, could you please take a look?
5 years ago (2015-12-12 01:39:54 UTC) #2
Randy Smith (Not in Mondays)
Nice catch; thanks. LGTM. I'll note that it's frustrating reading the code without the call ...
5 years ago (2015-12-12 20:32:11 UTC) #3
Łukasz Anforowicz
Thanks for reviewing. On 2015/12/12 20:32:11, rdsmith wrote: > Nice catch; thanks. LGTM. The first ...
5 years ago (2015-12-14 17:40:12 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1519283002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1519283002/20001
5 years ago (2015-12-14 17:41:28 UTC) #7
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years ago (2015-12-14 18:49:27 UTC) #8
commit-bot: I haz the power
5 years ago (2015-12-14 18:50:15 UTC) #10
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5669529aa87b0d38985b592ec08affed7dc6cfdb
Cr-Commit-Position: refs/heads/master@{#365053}

Powered by Google App Engine
This is Rietveld 408576698