s3:utils: Do not overflow the destination buffer in net_idmap_restore()
authorAndreas Schneider <asn@samba.org>
Thu, 9 Aug 2018 14:19:48 +0000 (16:19 +0200)
committerJeremy Allison <jra@samba.org>
Fri, 10 Aug 2018 23:49:16 +0000 (01:49 +0200)
commitf20150fb1ea5292f099862af6268d06844954d5e
treef4a32cbf51de1927cdc65b512297a2dc2c256c24
parente4f4f5eb7303a0cce4f426dd9cfd1d6a488495b0
s3:utils: Do not overflow the destination buffer in net_idmap_restore()

Found by covsan.

error[invalidScanfFormatWidth]: Width 128 given in format string (no. 2)
is larger than destination buffer 'sid_string[128]', use %127s to
prevent overflowing it.

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

Pair-Programmed-With: Justin Stephenson <jstephen@redhat.com>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Justin Stephenson <jstephen@redhat.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/net_idmap.c