s4:torture: Use strlcpy() in gen_name()
commit7cf1573dec15fa806cf3b5265a86f74d8a1d77cc
authorAndreas Schneider <asn@samba.org>
Wed, 9 May 2018 15:35:45 +0000 (9 17:35 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 27 Jun 2018 08:34:21 +0000 (27 10:34 +0200)
tree1e13690652de2181db3c9d0185136247ec307000
parentc4a2cd3ec3bb69959fdd8ee1cc6bf8e92032206a
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>
(cherry picked from commit 7a00d90d668f53914ffe035c41a5e79e60b51521)
source4/torture/basic/mangle_test.c