s4:ntvfs: Fix string copy of share_name
authorAndreas Schneider <asn@samba.org>
Tue, 15 May 2018 15:55:22 +0000 (17:55 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 17 May 2018 15:30:09 +0000 (17:30 +0200)
commit609ef35c12900bbd5ecaa557f7b5d71b5784a103
tree367993c0e559871d6e54a064758a8c57e55b53ef
parentfb6cd9c44ac6fcc9f6abe3b63fc742aeac42969a
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>
source4/ntvfs/ipc/rap_server.c