mirror of
https://github.com/chromium/crashpad.git
synced 2024-12-28 07:48:14 +08:00
Vlad Tsyrklevich
f2a07982ff
Change edge case handling in ReadCStringInternal
Currently, TaskMemory::ReadCStringInternal() treats the ReadCStringSizeLimited(size=0) case by returning an empty string; however, that is inconsistent with the documentation for that function and the equivalent implementation in ProcessMemory. The comment for the size parameter is: "The maximum number of bytes to read. The string is required to be `NUL`-terminated within this many bytes." My interpretation is that the ProcessMemory behavior is correct in failing on size=0 as a NUL can never be read. ReadCStringSizeLimited() is only used with a possibly null size in MachOImageReader::ReadDylinkerCommand(). In that case we read the dylinker_command string, which appears to also be verified to be a non-zero length null terminated string in load_dylinker() in bsd/kern/mach_loader.c so we shouldn't hit this case in the wild. Bug: crashpad:263 Change-Id: I2bd9c0ce3055154a98afdd19af95bb48d05f05a3 Reviewed-on: https://chromium-review.googlesource.com/c/1384448 Reviewed-by: Mark Mentovai <mark@chromium.org> Commit-Queue: Vlad Tsyrklevich <vtsyrklevich@chromium.org>
Crashpad
Crashpad is a crash-reporting system.
Documentation
- Project status
- Developing Crashpad: instructions for getting the source code, building, testing, and contributing to the project.
- Crashpad interface documentation
- Crashpad tool man pages
- Crashpad overview design
Source Code
Crashpad’s source code is hosted in a Git repository at https://chromium.googlesource.com/crashpad/crashpad.
Other Links
- Bugs can be reported at the Crashpad issue tracker.
- The Crashpad bots perform automated builds and tests.
- crashpad-dev is the Crashpad developers’ mailing list.
Description
Languages
C++
92.6%
Objective-C++
2.5%
C
2%
Python
1.7%
Assembly
0.9%
Other
0.3%