diff options
author | Andreas Schneider <asn@samba.org> | 2018-06-18 10:43:53 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-06-20 22:22:07 +0200 |
commit | 4a3164e0beea35c1f4ce44fbe43547f7104587d1 (patch) | |
tree | 3cfaa0932ebaf0289b846c4641f027880b2092dd /source3/utils/smbget.c | |
parent | 29f6842ee86b768f3677b38c5640655e312c398e (diff) | |
download | samba-4a3164e0beea35c1f4ce44fbe43547f7104587d1.tar.gz |
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>
Diffstat (limited to 'source3/utils/smbget.c')
-rw-r--r-- | source3/utils/smbget.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index d2d5e00a8ed..e1be42917fb 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -288,7 +288,7 @@ static void print_progress(const char *name, time_t start, time_t now, double avg = 0.0; long eta = -1; double prcnt = 0.0; - char hpos[20], htotal[20], havg[20]; + char hpos[22], htotal[22], havg[22]; char *status, *filename; int len; if (now - start) { |