From b36f224892152af786e69bb166497e6fd9c44cd6 Mon Sep 17 00:00:00 2001 From: Alexander Bokovoy Date: Fri, 13 Nov 2020 14:36:16 +0200 Subject: [PATCH] ipa-otpd: fix gcc complaints in Rawhide In file included from /usr/include/string.h:519, from /usr/include/lber.h:30, from /usr/include/ldap.h:30, from internal.h:27, from main.c:31: In function 'strncpy', inlined from 'main' at main.c:237:5: /usr/include/bits/string_fortified.h:91:10: warning: 'strncpy' specified bound 255 equals destination size [-Wstringop-truncation] 91 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest)); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Fixes: https://pagure.io/freeipa/issue/8585 Signed-off-by: Alexander Bokovoy Reviewed-By: Rob Crittenden --- daemons/ipa-otpd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemons/ipa-otpd/main.c b/daemons/ipa-otpd/main.c index 2efb371ee..529e3834a 100644 --- a/daemons/ipa-otpd/main.c +++ b/daemons/ipa-otpd/main.c @@ -214,7 +214,7 @@ static krb5_error_code setup_ldap(const char *uri, krb5_boolean bind, int main(int argc, char **argv) { const char *hostname; - char fqdn[IPA_HOST_FQDN_LEN]; + char fqdn[IPA_HOST_FQDN_LEN + 1]; krb5_error_code retval; krb5_data hndata; verto_ev *sig;