summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source3/smbd/connection.c1
-rw-r--r--source3/smbd/negprot.c1
-rw-r--r--source3/smbd/trans2.c8
3 files changed, 10 insertions, 0 deletions
diff --git a/source3/smbd/connection.c b/source3/smbd/connection.c
index 92aaebab1f..5bb76eb3bd 100644
--- a/source3/smbd/connection.c
+++ b/source3/smbd/connection.c
@@ -42,6 +42,7 @@ static void make_conn_key(connection_struct *conn, const char *name, TDB_DATA *p
pkey->cnum = conn?conn->cnum:-1;
fstrcpy(pkey->name, name);
#ifdef DEVELOPER
+ /* valgrind fixer... */
{
size_t sl = strlen(pkey->name);
if (sizeof(fstring)-sl)
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 648801e955..2a2ca25532 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -184,6 +184,7 @@ static int negprot_spnego(char *p)
safe_strcpy((char *)guid, global_myname(), sizeof(guid)-1);
#ifdef DEVELOPER
+ /* valgrind fixer... */
{
size_t sl = strlen(guid);
if (sizeof(guid)-sl)
diff --git a/source3/smbd/trans2.c b/source3/smbd/trans2.c
index f43a65af5c..161dc629dc 100644
--- a/source3/smbd/trans2.c
+++ b/source3/smbd/trans2.c
@@ -683,6 +683,14 @@ static BOOL get_lanman2_dir_entry(connection_struct *conn,
mangle_map(mangled_name,True,True,SNUM(conn));
mangled_name[12] = 0;
len = srvstr_push(outbuf, p+2, mangled_name, 24, STR_UPPER);
+#ifdef DEVELOPER
+ /* valgrind fixer... */
+ {
+ size_t sl = strlen(p+2);
+ if (24-sl)
+ memset(&p[sl+2], '\0', 24-sl);
+ }
+#endif
SSVAL(p, 0, len);
} else {
SSVAL(p,0,0);