From 28f2a8e10dd5375576160a31efde1697222567c3 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 25 Jan 2017 20:00:51 +0000 Subject: [PATCH] build: appease check_sec.sh --- init.c | 8 ++++---- muttlib.c | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/init.c b/init.c index 70f955fb3..168c9f0e9 100644 --- a/init.c +++ b/init.c @@ -2632,15 +2632,15 @@ static int to_absolute_path(char *path, const char *reference) return true; } - ref_tmp = strdup(reference); + ref_tmp = safe_strdup(reference); dirpath = dirname(ref_tmp); // get directory name of strncpy(abs_path, dirpath, PATH_MAX); - strncat(abs_path, "/", PATH_MAX - 1); // append a / at the end of the path + safe_strncat(abs_path, sizeof(abs_path), "/", 1); // append a / at the end of the path - free(ref_tmp); + FREE(&ref_tmp); path_len = PATH_MAX - strlen(path); - strncat(abs_path, path, path_len > 0 ? path_len : 0); + safe_strncat(abs_path, sizeof(abs_path), path, path_len > 0 ? path_len : 0); path = realpath(abs_path, path); diff --git a/muttlib.c b/muttlib.c index 62548dc64..d12c87ad3 100644 --- a/muttlib.c +++ b/muttlib.c @@ -298,8 +298,8 @@ int mutt_pop_heap(HEAP **head) if (!elt) return 0; *head = elt->next; - free(elt->data); - free(elt); + FREE(&elt->data); + FREE(&elt); return 1; } -- 2.40.0