libxcrypt/libxcrypt-4.4.2-gcc9_fix_Werror_format-overflow.patch
2019-01-21 17:08:31 +01:00

33 lines
1.1 KiB
Diff

From ec2078568431d65aec3b878cc871e10ad11a9d50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= <besser82@fedoraproject.org>
Date: Mon, 21 Jan 2019 16:15:42 +0100
Subject: [PATCH] test-crypt-bcrypt: Fix -Werror=format-overflow.
---
test-crypt-bcrypt.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/test-crypt-bcrypt.c b/test-crypt-bcrypt.c
index 947639f..249b1af 100644
--- a/test-crypt-bcrypt.c
+++ b/test-crypt-bcrypt.c
@@ -189,6 +189,7 @@ main (void)
int ok = !setting || hash[0] != '*';
char s_buf[30];
char o_buf[sizeof (struct crypt_data)];
+ const struct crypt_data *o_buf_ptr = (void *) o_buf;
int errnm, match;
if (!setting)
@@ -243,8 +244,8 @@ main (void)
{
printf ("FAIL: %d/crypt_rn: key=%s setting=%s: "
"xhash=%s xmagic=%s xerr=%d, p=%s obuf=%s err=%s\n",
- i, key, setting, hash, x, !ok, p, o_buf,
- strerror (errnm));
+ i, key, setting, hash, x, !ok, p,
+ o_buf_ptr->output, strerror (errnm));
status = 1;
continue;
}