1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

Fix for off-by-one StrnCpy.

Jeremy.
(This used to be commit 63cafb34b39443d03d17ae01b47adc0926b05fe2)
This commit is contained in:
Jeremy Allison 2000-11-21 02:38:22 +00:00
parent 2bd3a436fd
commit 2130ced345

View File

@ -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;