s3:smbget: Fix buffer truncation issues with gcc8
commit4a3164e0beea35c1f4ce44fbe43547f7104587d1
authorAndreas Schneider <asn@samba.org>
Mon, 18 Jun 2018 08:43:53 +0000 (18 10:43 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 20 Jun 2018 20:22:07 +0000 (20 22:22 +0200)
tree3cfaa0932ebaf0289b846c4641f027880b2092dd
parent29f6842ee86b768f3677b38c5640655e312c398e
s3:smbget: Fix buffer truncation issues with gcc8

../source3/utils/smbget.c: In function ‘smb_download_file’:
../source3/utils/smbget.c:97:27: error: ‘b’ directive output may be truncated writing 1 byte into a region of size between 0 and 19 [-Werror=format-truncation=]
   snprintf(buffer, l, "%jdb", (intmax_t)s);
                           ^

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>
source3/utils/smbget.c