diff options
author | Günther Deschner <gd@samba.org> | 2018-05-08 13:54:53 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2018-05-17 17:30:09 +0200 |
commit | 5729898248041794ffdd0b769332e015baf12cce (patch) | |
tree | 0789d4d837dccc96e4a9c3ade92b5677a70e79d0 /source4/torture/smb2 | |
parent | 6326b3415f3e225aafd5912d0965c80abcd7b22c (diff) | |
download | samba-5729898248041794ffdd0b769332e015baf12cce.tar.gz |
s4-torture: fix format-truncation warning in smb2 session tests.
../source4/torture/smb2/session.c: In function ‘test_session_reauth5’:
../source4/torture/smb2/session.c:645:36: error: ‘\file.dat’ directive output may be truncated writing 9 bytes into a region of size between 1 and 256 [-Werror=format-truncation=]
snprintf(fname, sizeof(fname), "%s\\file.dat", dname);
^~~~~~~~~~
../source4/torture/smb2/session.c:645:2: note: ‘snprintf’ output between 10 and 265 bytes into a destination of size 256
snprintf(fname, sizeof(fname), "%s\\file.dat", dname);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../source4/torture/smb2/session.c:696:38: error: ‘\file2.dat’ directive output may be truncated writing 10 bytes into a region of size between 1 and 256 [-Werror=format-truncation=]
snprintf(fname2, sizeof(fname2), "%s\\file2.dat", dname);
^~~~~~~~~~~
../source4/torture/smb2/session.c:696:2: note: ‘snprintf’ output between 11 and 266 bytes into a destination of size 256
snprintf(fname2, sizeof(fname2), "%s\\file2.dat", dname);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13437
Guenther
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r-- | source4/torture/smb2/session.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/torture/smb2/session.c b/source4/torture/smb2/session.c index 15a11e235d6..f3fa596e464 100644 --- a/source4/torture/smb2/session.c +++ b/source4/torture/smb2/session.c @@ -616,7 +616,7 @@ bool test_session_reauth5(struct torture_context *tctx, struct smb2_tree *tree) { NTSTATUS status; TALLOC_CTX *mem_ctx = talloc_new(tctx); - char dname[256]; + char dname[128]; char fname[256]; char fname2[256]; struct smb2_handle _dh1; |