summaryrefslogtreecommitdiff
path: root/loader
diff options
context:
space:
mode:
authorWilliam Pitcock <nenolod@dereferenced.org>2018-02-08 11:59:13 -0600
committerWilliam Pitcock <nenolod@dereferenced.org>2018-02-08 11:59:13 -0600
commit29d1335a88e5d2350fb0158cdd69e39b6313f18a (patch)
tree6fa89afdc99e316def7e1b8319301e06441c4edc /loader
parentaa10a393d6d20fed261c3cdb404e661aab83322d (diff)
downloadgcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.gz
gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.bz2
gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.tar.xz
gcompat-29d1335a88e5d2350fb0158cdd69e39b6313f18a.zip
loader: quiet some valgrind warnings
Diffstat (limited to 'loader')
-rw-r--r--loader/loader.c6
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)) {