mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-12-23 13:05:27 +00:00
Fix problem with not NULL terminating mapping name.
BUG=453 Review URL: http://breakpad.appspot.com/323001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@881 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
ec24b1b19e
commit
efcd534bd2
|
@ -503,7 +503,8 @@ void ExceptionHandler::AddMappingInfo(const std::string& name,
|
|||
info.start_addr = start_address;
|
||||
info.size = mapping_size;
|
||||
info.offset = file_offset;
|
||||
strncpy(info.name, name.c_str(), std::min(name.size(), sizeof(info)));
|
||||
strncpy(info.name, name.c_str(), sizeof(info.name) - 1);
|
||||
info.name[sizeof(info.name) - 1] = '\0';
|
||||
|
||||
MappingEntry mapping;
|
||||
mapping.first = info;
|
||||
|
|
Loading…
Reference in a new issue