summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2003-05-31 02:03:58 +0000
committerJeremy Allison <jra@samba.org>2003-05-31 02:03:58 +0000
commit0899066fd6afc0fa8617d9e8c6dc5f6a7ece1dc5 (patch)
tree9e03fbc5696af23fedc6968c3ca172deb4688219 /source3/smbd
parent1fdbe30685501362fc90bdd968453f726e18c6eb (diff)
downloadsamba-0899066fd6afc0fa8617d9e8c6dc5f6a7ece1dc5.tar.gz
samba-0899066fd6afc0fa8617d9e8c6dc5f6a7ece1dc5.tar.bz2
samba-0899066fd6afc0fa8617d9e8c6dc5f6a7ece1dc5.zip
Got us happy running under valgrind again :-).
Jeremy. (This used to be commit b6ab9d73610861d225d72845d4df7cf970155e39)
Diffstat (limited to 'source3/smbd')
-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);