From c437ba5c28ffc547f2e2c34eed14c3484b6dd4cd Mon Sep 17 00:00:00 2001 From: Norbert Pocs Date: Mon, 4 Jul 2022 10:08:07 +0200 Subject: [PATCH] Rewrite strerror to ssh_strerror Signed-off-by: Norbert Pocs Reviewed-by: Jakub Jelen --- src/dh-gex.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/dh-gex.c b/src/dh-gex.c index 281da9bf..867015b6 100644 --- a/src/dh-gex.c +++ b/src/dh-gex.c @@ -515,10 +515,11 @@ static int ssh_retrieve_dhgroup(char *moduli_file, moduli = fopen(MODULI_FILE, "r"); if (moduli == NULL) { + char err_msg[SSH_ERRNO_MSG_MAX] = {0}; SSH_LOG(SSH_LOG_WARNING, "Unable to open moduli file: %s", - strerror(errno)); - return ssh_fallback_group(pmax, p, g); + ssh_strerror(errno, err_msg, SSH_ERRNO_MSG_MAX)); + return ssh_fallback_group(pmax, p, g); } *size = 0;