diff options
author | brian <brian@FreeBSD.org> | 1997-12-23 22:38:55 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 1997-12-23 22:38:55 +0000 |
commit | 24138e024fe13d912a174a8e0e784bf1a1e0a29d (patch) | |
tree | cce9d71a4b4a1baea1557e670c6c8e497c76b237 /usr.sbin/ppp/defs.c | |
parent | 9672a80ab32ce23bfa528d665a4d62625db2e8a6 (diff) | |
download | FreeBSD-src-24138e024fe13d912a174a8e0e784bf1a1e0a29d.zip FreeBSD-src-24138e024fe13d912a174a8e0e784bf1a1e0a29d.tar.gz |
strncpy(x,y,sizeof(x)) --> strncpy(x,y,sizeof(x)-1)
Suggested by: Philippe Charnier <charnier@lirmm.fr>
Theo de Raadt <deraadt@cvs.openbsd.org>
Diffstat (limited to 'usr.sbin/ppp/defs.c')
-rw-r--r-- | usr.sbin/ppp/defs.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ppp/defs.c b/usr.sbin/ppp/defs.c index d518c18..3bad88b 100644 --- a/usr.sbin/ppp/defs.c +++ b/usr.sbin/ppp/defs.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id$ + * $Id: defs.c,v 1.6 1997/12/21 12:11:05 brian Exp $ */ #include <sys/param.h> @@ -56,7 +56,7 @@ void SetLabel(const char *label) { if (label) - strncpy(dstsystem, label, sizeof dstsystem); + strncpy(dstsystem, label, sizeof(dstsystem) - 1); else *dstsystem = '\0'; } |