aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-09 22:39:26 +0000
committerkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2011-11-09 22:39:26 +0000
commitefcd534bd2a1d388f465012f71f710a779bf2b38 (patch)
treee86d75822956b6198e480ea67550addb16aa409c /src
parent Add mach_vm_deallocate to the set of function not available on iOS5. (diff)
downloadbreakpad-efcd534bd2a1d388f465012f71f710a779bf2b38.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/handler/exception_handler.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/client/linux/handler/exception_handler.cc b/src/client/linux/handler/exception_handler.cc
index c2336ccf..7949582f 100644
--- a/src/client/linux/handler/exception_handler.cc
+++ b/src/client/linux/handler/exception_handler.cc
@@ -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;