diff options
| author | mjl <mjl@NetBSD.org> | 1999-12-23 02:10:07 +0000 |
|---|---|---|
| committer | mjl <mjl@NetBSD.org> | 1999-12-23 02:10:07 +0000 |
| commit | 8515b446a0767f4f0c14dfd7bbc7d255dbdaee26 (patch) | |
| tree | e18571ce082ba6f1096e80af614405056209592d /usr.sbin | |
| parent | dd30883b03ce4e1dfb52e342afed3d41efea2692 (diff) | |
Fix null terminating the wrong buffer curtesy of similar variables
mixed up. Seemed to never have any ill effect, but then...
Noted by Tetsuya Furukawa in FreeBSD PR/15604.
Diffstat (limited to 'usr.sbin')
| -rw-r--r-- | usr.sbin/lpr/lpd/lpd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/lpr/lpd/lpd.c b/usr.sbin/lpr/lpd/lpd.c index 445f1e9f680..4b52cebc172 100644 --- a/usr.sbin/lpr/lpd/lpd.c +++ b/usr.sbin/lpr/lpd/lpd.c @@ -1,4 +1,4 @@ -/* $NetBSD: lpd.c,v 1.18 1999/12/07 14:54:46 mrg Exp $ */ +/* $NetBSD: lpd.c,v 1.19 1999/12/23 02:10:07 mjl Exp $ */ /* * Copyright (c) 1983, 1993, 1994 @@ -45,7 +45,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1993, 1994\n\ #if 0 static char sccsid[] = "@(#)lpd.c 8.7 (Berkeley) 5/10/95"; #else -__RCSID("$NetBSD: lpd.c,v 1.18 1999/12/07 14:54:46 mrg Exp $"); +__RCSID("$NetBSD: lpd.c,v 1.19 1999/12/23 02:10:07 mjl Exp $"); #endif #endif /* not lint */ @@ -582,7 +582,7 @@ chkhost(f) inet_ntoa(f->sin_addr)); (void)strncpy(fromb, hp->h_name, sizeof(fromb) - 1); - from[sizeof(fromb) - 1] = '\0'; + fromb[sizeof(fromb) - 1] = '\0'; from = fromb; /* Check for spoof, ala rlogind */ |
