summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2018-05-09 18:05:01 +0200
committerAndreas Schneider <asn@cryptomilk.org>2018-05-17 17:30:09 +0200
commit728297ca889b39ce2006778bf6a5bf1c3ce82d6d (patch)
tree26234aa16105ae74157442dee93b54fc363d2afe /source3
parentff7568daaeb19ff30f47f7f600ead247eaf4e826 (diff)
downloadsamba-728297ca889b39ce2006778bf6a5bf1c3ce82d6d.tar.gz
s3:passdb: Fix size of ascii_p16
../source3/passdb/pdb_smbpasswd.c: In function ‘mod_smbfilepwd_entry’: ../source3/passdb/pdb_smbpasswd.c:1015:7: error: ‘:LCT-’ directive output may be truncated writing 5 bytes into a region of size between 0 and 255 [-Werror=format-truncat ion=] "%s:LCT-%08X:", ^~~~~ ../source3/passdb/pdb_smbpasswd.c:1015:4: note: using the range [0, 4294967295] for directive argument "%s:LCT-%08X:", ^~~~~~~~~~~~~~ In file included from ../source3/include/includes.h:23, from ../source3/passdb/pdb_smbpasswd.c:23: ../lib/replace/../replace/replace.h:514:18: note: ‘snprintf’ output between 15 and 270 bytes into a destination of size 255 #define slprintf snprintf ../source3/passdb/pdb_smbpasswd.c:1013:3: note: in expansion of macro ‘slprintf’ slprintf(&ascii_p16[strlen(ascii_p16)], ^~~~~~~~ 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')
-rw-r--r--source3/passdb/pdb_smbpasswd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/passdb/pdb_smbpasswd.c b/source3/passdb/pdb_smbpasswd.c
index 8a3d48b9980..2615cbdd788 100644
--- a/source3/passdb/pdb_smbpasswd.c
+++ b/source3/passdb/pdb_smbpasswd.c
@@ -741,7 +741,7 @@ static bool mod_smbfilepwd_entry(struct smbpasswd_privates *smbpasswd_state, con
char linebuf[LINEBUF_SIZE + 1];
char readbuf[1024];
int c;
- fstring ascii_p16;
+ char ascii_p16[FSTRING_LEN + 20];
fstring encode_bits;
unsigned char *p = NULL;
size_t linebuf_len = 0;