s4:torture: Use strlcpy() in gen_name()
authorAndreas Schneider <asn@samba.org>
Wed, 9 May 2018 15:35:45 +0000 (17:35 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 17 May 2018 15:30:09 +0000 (17:30 +0200)
commit7a00d90d668f53914ffe035c41a5e79e60b51521
treecb8abb5c6fb3eee0b1fb58dce911323179b58937
parent7cec343a89a0862c09f5ddd4707eb442157a4af2
s4:torture: Use strlcpy() in gen_name()

../source4/torture/basic/mangle_test.c: In function ‘gen_name’:
../source4/torture/basic/mangle_test.c:148:3: error: ‘strncpy’ output
    truncated before terminating nul copying 5 bytes from a string of the
    same length [-Werror=stringop-truncation]
   strncpy(p, "ABCDE", 5);
   ^~~~~~~~~~~~~~~~~~~~~~

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/basic/mangle_test.c