summaryrefslogtreecommitdiffstats
path: root/source/smbd/lanman.c
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
commit63cafb34b39443d03d17ae01b47adc0926b05fe2 (patch)
tree42f7f556e840e972772abe5d66018d827eab0320 /source/smbd/lanman.c
parent78a13074455618308d048d1c69f62e660988eb90 (diff)
downloadsamba-63cafb34b39443d03d17ae01b47adc0926b05fe2.tar.gz
samba-63cafb34b39443d03d17ae01b47adc0926b05fe2.tar.xz
samba-63cafb34b39443d03d17ae01b47adc0926b05fe2.zip
Fix for off-by-one StrnCpy.
Jeremy.
Diffstat (limited to 'source/smbd/lanman.c')
-rw-r--r--source/smbd/lanman.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/smbd/lanman.c b/source/smbd/lanman.c
index 51472ea3090..1e461f10a92 100644
--- a/source/smbd/lanman.c
+++ b/source/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;