From 3cd3ba8e447a1be2c99719937d68c91b441200e8 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 20 Jan 2019 23:02:12 +0100 Subject: [PATCH] Fix gcc warnings --- src/wordlist.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wordlist.c b/src/wordlist.c index e605dc7e4..d9f51447b 100644 --- a/src/wordlist.c +++ b/src/wordlist.c @@ -360,8 +360,8 @@ int count_words (hashcat_ctx_t *hashcat_ctx, FILE *fd, const char *dictfile, u64 memset (d.encoding_from, 0, sizeof (d.encoding_from)); memset (d.encoding_to, 0, sizeof (d.encoding_to)); - strncpy (d.encoding_from, user_options->encoding_from, sizeof (d.encoding_from)); - strncpy (d.encoding_to, user_options->encoding_to, sizeof (d.encoding_to)); + strncpy (d.encoding_from, user_options->encoding_from, sizeof (d.encoding_from) - 1); + strncpy (d.encoding_to, user_options->encoding_to, sizeof (d.encoding_to) - 1); if (d.stat.st_size == 0) {