From 29d1335a88e5d2350fb0158cdd69e39b6313f18a Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Thu, 8 Feb 2018 11:59:13 -0600 Subject: loader: quiet some valgrind warnings --- loader/loader.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/loader/loader.c b/loader/loader.c index ebcdbfe..dd3f0d2 100644 --- a/loader/loader.c +++ b/loader/loader.c @@ -82,11 +82,11 @@ void usage(void) int main(int argc, char *argv[], char *envp[]) { char **new_argv = calloc(argc + 6, sizeof(char *)); - char preload[PATH_MAX]; - char target[PATH_MAX]; + char preload[PATH_MAX] = ""; + char target[PATH_MAX] = ""; ssize_t i, j, len; - strcpy(preload, LIBGCOMPAT " "); + strlcpy(preload, LIBGCOMPAT " ", sizeof(preload)); if (getenv("LD_PRELOAD") != NULL) { len = strlcat(preload, getenv("LD_PRELOAD"), sizeof(preload)); if ((size_t) len >= sizeof(preload)) { -- cgit v1.2.3-70-g09d2