From 1fdbe30685501362fc90bdd968453f726e18c6eb Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Sat, 31 May 2003 01:48:59 +0000 Subject: Fixes to stop valgrind complaining about uninitialised memory when it's copying clobbered buffer areas and doing hashes on them and sending them onto the wire. Jeremy. (This used to be commit 7dfcf714ae2e81fece489640e2341f132c9f567d) --- source3/smbd/negprot.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'source3/smbd/negprot.c') diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c index bd1b9b0d57..648801e955 100644 --- a/source3/smbd/negprot.c +++ b/source3/smbd/negprot.c @@ -182,6 +182,15 @@ static int negprot_spnego(char *p) ZERO_STRUCT(guid); safe_strcpy((char *)guid, global_myname(), sizeof(guid)-1); + +#ifdef DEVELOPER + { + size_t sl = strlen(guid); + if (sizeof(guid)-sl) + memset(&guid[sl], '\0', sizeof(guid)-sl); + } +#endif + strlower((char *)guid); #if 0 -- cgit