summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2003-03-06 08:24:39 +0000
committerAndrew Bartlett <abartlet@samba.org>2003-03-06 08:24:39 +0000
commit6684c85714f3c30ba7cb56d71c2eddf5090c00af (patch)
tree3ab5ee928d457a5f8f6faa97337d22aa046535b6 /source3/smbd
parent192148bab352697e625e78e7f2444e00453f35ff (diff)
downloadsamba-6684c85714f3c30ba7cb56d71c2eddf5090c00af.tar.gz
samba-6684c85714f3c30ba7cb56d71c2eddf5090c00af.tar.bz2
samba-6684c85714f3c30ba7cb56d71c2eddf5090c00af.zip
more off-by-one safe_strcpy()
(This used to be commit d8d2d5e75503ae2b6532a25e4c9bbcdf20cc60af)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/negprot.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index c8f023514e..db0694a840 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -167,7 +167,7 @@ static int reply_lanman2(char *inbuf, char *outbuf)
static int negprot_spnego(char *p)
{
DATA_BLOB blob;
- uint8 guid[16];
+ uint8 guid[17];
const char *OIDs_krb5[] = {OID_KERBEROS5,
OID_KERBEROS5_OLD,
OID_NTLMSSP,
@@ -178,8 +178,8 @@ static int negprot_spnego(char *p)
global_spnego_negotiated = True;
- memset(guid, 0, 16);
- safe_strcpy((char *)guid, global_myname(), 16);
+ ZERO_STRUCT(guid);
+ safe_strcpy((char *)guid, global_myname(), sizeof(guid)-1);
strlower((char *)guid);
#if 0