]> granicus.if.org Git - neomutt/commitdiff
build: appease check_sec.sh
authorRichard Russon <rich@flatcap.org>
Wed, 25 Jan 2017 20:00:51 +0000 (20:00 +0000)
committerRichard Russon <rich@flatcap.org>
Wed, 25 Jan 2017 20:00:51 +0000 (20:00 +0000)
init.c
muttlib.c

diff --git a/init.c b/init.c
index 70f955fb3e9da3d3c608def5e9d2e322088a4d57..168c9f0e935e25686ef8d9cf44c7fc53f23ee1aa 100644 (file)
--- 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);
 
index 62548dc6441c1a2725aa8d3e382276c32a7ffeb5..d12c87ad3d3b308901b6f52b8ccbb827bfb27a83 100644 (file)
--- 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;
 }