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

Issue 274673002: Pepper: Fix crash on allocation failure. (Closed)

Created:
6 years, 7 months ago by teravest
Modified:
6 years, 7 months ago
Reviewers:
bbudge
CC:
chromium-reviews
Visibility:
Public.

Description

Pepper: Fix crash on allocation failure. GetPNaClResourceInfo() currently performs a 1 megabyte allocation. Though any memory allocation can fail, this one is more likely due to its size. This change mitigates this problem in two ways. If memory allocation fails, we report an error and return early instead of using memory. Additionally, this change checks the size of the file before performing a memory allocation. This should lead to smaller allocations and more successful plugin loads. BUG=370965 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269791 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=269948

Patch Set 1 #

Total comments: 1

Patch Set 2 : Fix ASAN failure #

Unified diffs Side-by-side diffs Delta from patch set Stats (+30 lines, -4 lines) Patch
M components/nacl/renderer/ppb_nacl_private_impl.cc View 1 1 chunk +30 lines, -4 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
teravest
6 years, 7 months ago (2014-05-07 18:44:39 UTC) #1
bbudge
https://codereview.chromium.org/274673002/diff/1/components/nacl/renderer/ppb_nacl_private_impl.cc File components/nacl/renderer/ppb_nacl_private_impl.cc (right): https://codereview.chromium.org/274673002/diff/1/components/nacl/renderer/ppb_nacl_private_impl.cc#newcode1148 components/nacl/renderer/ppb_nacl_private_impl.cc:1148: if (file_info.size > 1 << 20) { The old ...
6 years, 7 months ago (2014-05-08 00:15:59 UTC) #2
teravest
On Wed, May 7, 2014 at 6:15 PM, <bbudge@chromium.org> wrote: > > https://codereview.chromium.org/274673002/diff/1/components/nacl/renderer/ppb_nacl_private_impl.cc > File ...
6 years, 7 months ago (2014-05-08 03:44:55 UTC) #3
teravest
ping?
6 years, 7 months ago (2014-05-09 00:14:05 UTC) #4
bbudge
LGTM
6 years, 7 months ago (2014-05-09 13:29:46 UTC) #5
teravest
The CQ bit was checked by teravest@chromium.org
6 years, 7 months ago (2014-05-12 14:27:11 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/274673002/1
6 years, 7 months ago (2014-05-12 14:27:24 UTC) #7
commit-bot: I haz the power
Change committed as 269791
6 years, 7 months ago (2014-05-12 15:58:27 UTC) #8
teravest
The CQ bit was checked by teravest@chromium.org
6 years, 7 months ago (2014-05-12 21:19:21 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/teravest@chromium.org/274673002/20001
6 years, 7 months ago (2014-05-12 21:21:05 UTC) #10
commit-bot: I haz the power
6 years, 7 months ago (2014-05-13 01:07:07 UTC) #11
Message was sent while issue was closed.
Change committed as 269948

Powered by Google App Engine
This is Rietveld 408576698