From 788535f217993e022ca55a05f9526855e0072bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 25 Jul 2022 15:45:36 +0300 Subject: [PATCH] Fix GCC -Og -Wmaybe-uninitialized --- plugins/auth/caching_sha2_pw.c | 4 ++-- plugins/auth/sha256_pw.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/auth/caching_sha2_pw.c b/plugins/auth/caching_sha2_pw.c index 4e1af7d76..651943ebb 100644 --- a/plugins/auth/caching_sha2_pw.c +++ b/plugins/auth/caching_sha2_pw.c @@ -1,5 +1,5 @@ /************************************************************************************ - Copyright (C) 2017 MariaDB Corporation AB + Copyright (C) 2017, 2022, MariaDB Corporation AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -243,7 +243,7 @@ static int auth_caching_sha2_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) char passwd[MAX_PW_LEN]; #ifdef HAVE_OPENSSL unsigned char *rsa_enc_pw= NULL; - size_t rsa_size; + size_t rsa_size= 0; #else unsigned char rsa_enc_pw[MAX_PW_LEN]; ULONG rsa_size; diff --git a/plugins/auth/sha256_pw.c b/plugins/auth/sha256_pw.c index fbe5a2bd3..79a597531 100644 --- a/plugins/auth/sha256_pw.c +++ b/plugins/auth/sha256_pw.c @@ -1,5 +1,5 @@ /************************************************************************************ - Copyright (C) 2017 MariaDB Corporation AB + Copyright (C) 2017, 2022, MariaDB Corporation AB This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public @@ -164,7 +164,7 @@ static int auth_sha256_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql) int packet_length; int rc= CR_ERROR; char passwd[MAX_PW_LEN]; - unsigned int rsa_size; + unsigned int rsa_size= 0; unsigned int pwlen, i; #if defined(HAVE_OPENSSL)