aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/handler
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/linux/handler')
-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;