commit | eec1e17ab5588680a3e1d4904f5ba497e24f496b | [log] [tgz] |
---|---|---|
author | Scott Graham <scottmg@chromium.org> | Thu Feb 15 23:58:08 2018 |
committer | Commit Bot <commit-bot@chromium.org> | Fri Feb 16 00:03:41 2018 |
tree | 11d42bfdd98cab007eb70d383a683bc1b0df900f | |
parent | 5e5b927b38ca7fe75e6e683796b55f1d75266418 [diff] |
Fix two bugs in memset()ing CrashpadInfo on size mismatch In trying to clear out the end of info when the alleged size is smaller than the current structure size, we didn't handle the opposite case. We need to continue the rest of Read() to initialize members, but need to make sure not to pass a very large (negative -> size_t) length to memset(). Additionally, I believe it meant to memset from the end of the alleged size, to the end of the local structure, rather than from the beginning of the structure. This repro'd on Fuchsia, but would affect all platforms that use it. Bug: crashpad:196, crashpad:30 Change-Id: I9c35c834010b5cb26d54156ce8f9bc538dcbf96c Reviewed-on: https://chromium-review.googlesource.com/923094 Commit-Queue: Scott Graham <scottmg@chromium.org> Reviewed-by: Joshua Peraza <jperaza@chromium.org>
Crashpad is a crash-reporting system.
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.