From 686f515e04740567035f5824d24b828b1ff08270 Mon Sep 17 00:00:00 2001 From: Denis Kenzior Date: Mon, 17 Dec 2018 11:21:28 -0600 Subject: [PATCH] eap-ttls: Bump up buffer sizes to quiet warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/eap-ttls.c:766:50: error: ‘Password’ directive output may be truncated writing 8 bytes into a region of size between 1 and 72 [-Werror=format-truncation=] snprintf(password_key, sizeof(password_key), "%sPassword", prefix); ^~~~~~~~ In file included from /usr/include/stdio.h:862, from src/eap-ttls.c:28: /usr/include/bits/stdio2.h:64:10: note: ‘__builtin___snprintf_chk’ output between 9 and 80 bytes into a destination of size 72 return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __bos (__s), __fmt, __va_arg_pack ()); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- src/eap-ttls.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/eap-ttls.c b/src/eap-ttls.c index 114149c4..4735e7c3 100644 --- a/src/eap-ttls.c +++ b/src/eap-ttls.c @@ -386,7 +386,7 @@ static bool eap_ttls_phase2_non_eap_load_settings(struct phase2_method *phase2, const char *prefix) { struct phase2_credentials *credentials; - char setting[72]; + char setting[128]; credentials = l_new(struct phase2_credentials, 1); @@ -756,8 +756,8 @@ static int eap_ttls_check_tunneled_auth_settings(struct l_settings *settings, struct l_queue **out_missing) { const struct eap_secret_info *secret; - char identity_key[72]; - char password_key[72]; + char identity_key[128]; + char password_key[128]; L_AUTO_FREE_VAR(char *, identity); L_AUTO_FREE_VAR(char *, password) = NULL;