s4:ntvfs: Fix string copy of share_name
authorAndreas Schneider <asn@samba.org>
Tue, 15 May 2018 15:55:22 +0000 (17:55 +0200)
committerKarolin Seeger <kseeger@samba.org>
Wed, 20 Jun 2018 07:22:24 +0000 (09:22 +0200)
commitfd836721cf2a3d4e08f7fa6486aa98c306a6f8cb
treebc90d544b95881499789c245fb1ac0039b5f7d64
parent15c13f7372ca6c980d38a3be83225eb3cfd18f21
s4:ntvfs: Fix string copy of share_name

../source4/ntvfs/ipc/rap_server.c:70:3: error: ‘strncpy’ specified bound 13 equals destination size [-Werror=stringop-truncation]
   strncpy((char *)r->out.info[j].info1.share_name,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    snames[i],
    ~~~~~~~~~~
    sizeof(r->out.info[0].info1.share_name));
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
(cherry picked from commit 609ef35c12900bbd5ecaa557f7b5d71b5784a103)
source4/ntvfs/ipc/rap_server.c