summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2000-11-21 02:38:22 +0000
committerJeremy Allison <jra@samba.org>2000-11-21 02:38:22 +0000
commit2130ced345a6f3ecffe61c3622aceb8986925baa (patch)
tree0caec993e35718553b6c6c98fc39ee8079787997 /source3/smbd
parent2bd3a436fd6ed218bced476b502d24f317511fb2 (diff)
downloadsamba-2130ced345a6f3ecffe61c3622aceb8986925baa.tar.gz
samba-2130ced345a6f3ecffe61c3622aceb8986925baa.tar.bz2
samba-2130ced345a6f3ecffe61c3622aceb8986925baa.zip
Fix for off-by-one StrnCpy.
Jeremy. (This used to be commit 63cafb34b39443d03d17ae01b47adc0926b05fe2)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/lanman.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source3/smbd/lanman.c b/source3/smbd/lanman.c
index 51472ea309..1e461f10a9 100644
--- a/source3/smbd/lanman.c
+++ b/source3/smbd/lanman.c
@@ -76,7 +76,7 @@ static int CopyExpanded(connection_struct *conn,
StrnCpy(buf,src,sizeof(buf)/2);
pstring_sub(buf,"%S",lp_servicename(snum));
standard_sub_conn(conn,buf);
- StrnCpy(*dst,buf,*n);
+ StrnCpy(*dst,buf,*n-1);
l = strlen(*dst) + 1;
(*dst) += l;
(*n) -= l;