Module Name: src Committed By: elric Date: Wed Feb 15 02:48:31 UTC 2017
Modified Files: src/usr.sbin/inetd: inetd.c Log Message: Increase buffer size reported to strlcpy() to be one larger than the length of the string we copy in so that there is space for the '\0'. To generate a diff of this commit: cvs rdiff -u -r1.122 -r1.123 src/usr.sbin/inetd/inetd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.sbin/inetd/inetd.c diff -u src/usr.sbin/inetd/inetd.c:1.122 src/usr.sbin/inetd/inetd.c:1.123 --- src/usr.sbin/inetd/inetd.c:1.122 Sat Apr 5 23:36:10 2014 +++ src/usr.sbin/inetd/inetd.c Wed Feb 15 02:48:31 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: inetd.c,v 1.122 2014/04/05 23:36:10 khorben Exp $ */ +/* $NetBSD: inetd.c,v 1.123 2017/02/15 02:48:31 elric Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -66,7 +66,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 19 #if 0 static char sccsid[] = "@(#)inetd.c 8.4 (Berkeley) 4/13/94"; #else -__RCSID("$NetBSD: inetd.c,v 1.122 2014/04/05 23:36:10 khorben Exp $"); +__RCSID("$NetBSD: inetd.c,v 1.123 2017/02/15 02:48:31 elric Exp $"); #endif #endif /* not lint */ @@ -850,7 +850,7 @@ config(void) } (void)unlink(sep->se_service); strlcpy(sep->se_ctrladdr_un.sun_path, - sep->se_service, n); + sep->se_service, n + 1); sep->se_ctrladdr_un.sun_family = AF_LOCAL; sep->se_ctrladdr_size = (int)(n + sizeof(sep->se_ctrladdr_un) -