summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/defs.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1997-12-23 22:38:55 +0000
committerbrian <brian@FreeBSD.org>1997-12-23 22:38:55 +0000
commit24138e024fe13d912a174a8e0e784bf1a1e0a29d (patch)
treecce9d71a4b4a1baea1557e670c6c8e497c76b237 /usr.sbin/ppp/defs.c
parent9672a80ab32ce23bfa528d665a4d62625db2e8a6 (diff)
downloadFreeBSD-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.c4
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';
}
OpenPOWER on IntegriCloud