>>> 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 <ab@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
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;