DescriptionPepper: 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 #Messages
Total messages: 11 (0 generated)
|