diff options
author | William Pitcock <nenolod@dereferenced.org> | 2018-02-08 11:59:13 -0600 |
---|---|---|
committer | William Pitcock <nenolod@dereferenced.org> | 2018-02-08 11:59:13 -0600 |
commit | 29d1335a88e5d2350fb0158cdd69e39b6313f18a (patch) | |
tree | 6fa89afdc99e316def7e1b8319301e06441c4edc | |
parent | aa10a393d6d20fed261c3cdb404e661aab83322d (diff) | |
download | gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.gz gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.bz2 gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.xz gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.zip |
loader: quiet some valgrind warnings
-rw-r--r-- | loader/loader.c | 6 |
1 files 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)) { |