From 43a81daaba1f02eab50e2d0283f03b8ad45bf570 Mon Sep 17 00:00:00 2001 From: ladderbreaker Date: Tue, 3 Jul 2007 00:09:14 +0000 Subject: issue 194: reviewed by waylonis git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@195 4c0a9323-5329-0410-9bdc-e9ce6186880e --- src/client/mac/handler/dynamic_images.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/client/mac/handler') diff --git a/src/client/mac/handler/dynamic_images.h b/src/client/mac/handler/dynamic_images.h index 497f4eb4..4c4ab7ff 100644 --- a/src/client/mac/handler/dynamic_images.h +++ b/src/client/mac/handler/dynamic_images.h @@ -158,8 +158,9 @@ class DynamicImage { // Makes local copy of file path to mach-o binary void InitializeFilePath(char *inFilePath) { if (inFilePath) { - file_path_ = reinterpret_cast(malloc(strlen(inFilePath))); - strcpy(file_path_, inFilePath); + size_t path_size = 1 + strlen(inFilePath); + file_path_ = reinterpret_cast(malloc(path_size)); + strlcpy(file_path_, inFilePath, path_size); } else { file_path_ = NULL; } -- cgit v1.2.1