mirror of
https://github.com/samba-team/samba.git
synced 2025-01-26 10:04:02 +03:00
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)
This commit is contained in:
parent
974d402d6d
commit
1fdbe30685
@ -41,6 +41,13 @@ static void make_conn_key(connection_struct *conn, const char *name, TDB_DATA *p
|
||||
pkey->pid = sys_getpid();
|
||||
pkey->cnum = conn?conn->cnum:-1;
|
||||
fstrcpy(pkey->name, name);
|
||||
#ifdef DEVELOPER
|
||||
{
|
||||
size_t sl = strlen(pkey->name);
|
||||
if (sizeof(fstring)-sl)
|
||||
memset(&pkey->name[sl], '\0', sizeof(fstring)-sl);
|
||||
}
|
||||
#endif
|
||||
|
||||
pkbuf->dptr = (char *)pkey;
|
||||
pkbuf->dsize = sizeof(*pkey);
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user