From: Alexander Bokovoy Date: Wed, 3 Oct 2018 19:48:00 +0000 (+0300) Subject: s4/auth/tests: Fix kerberos test string size X-Git-Tag: tdb-1.3.17~1453 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=54207bb3b2e18cf36c2a5585f9847326930b33ed;p=thirdparty%2Fsamba.git s4/auth/tests: Fix kerberos test string size >>> len("user0@samba.example.com") 23 But the string definition does not take a final '\0' into account. As per Volker's suggestion, use compiler's support to allocate the string properly. Signed-off-by: Alexander Bokovoy Reviewed-by: Volker Lendecke --- diff --git a/source4/auth/tests/kerberos.c b/source4/auth/tests/kerberos.c index 703c8067908..fcc8ac45f7e 100644 --- a/source4/auth/tests/kerberos.c +++ b/source4/auth/tests/kerberos.c @@ -25,8 +25,8 @@ static void internal_obsolete_keytab_test(int num_principals, int num_kvnos, krb5_error_code code; int i,j; - char princ_name[6] = "user0"; - char expect_princ_name[23] = "user0@samba.example.com"; + char princ_name[] = "user0"; + char expect_princ_name[] = "user0@samba.example.com"; bool found_previous; const char *error_str;