summaryrefslogtreecommitdiff
path: root/addr2line.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-27 07:10:13 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-27 07:10:13 (GMT)
commit057098bfdcdbdc5bbd26fb51a7f8a37e6f8a2547 (patch)
treee10a09aee31112e34efb7ca9ebcf2ac1a8d18fb3 /addr2line.c
parent6245e02cd37b98d2d41efda697408ae5dd36119e (diff)
use strlcat
* addr2line.c (follow_debuglink): use strlcat instead of strncat. * dln.c (aix_loaderror): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45191 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'addr2line.c')
-rw-r--r--addr2line.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/addr2line.c b/addr2line.c
index f936694..92ff6b1 100644
--- a/addr2line.c
+++ b/addr2line.c
@@ -444,10 +444,8 @@ follow_debuglink(char *debuglink, int num_traces, void **traces, char **syms,
subdir = (char *)alloca(strlen(binary_filename) + 1);
strcpy(subdir, binary_filename);
strcpy(binary_filename, global_debug_dir);
- strncat(binary_filename, subdir,
- PATH_MAX - strlen(binary_filename) - 1);
- strncat(binary_filename, debuglink,
- PATH_MAX - strlen(binary_filename) - 1);
+ strlcat(binary_filename, subdir, PATH_MAX);
+ strlcat(binary_filename, debuglink, PATH_MAX);
munmap(current_line->mapped, current_line->mapped_size);
close(current_line->fd);