summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 20:28:58 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-04-04 20:28:58 +0000
commit3b94f8a0d302e3a08fd645b248baa4aa5dda7d77 (patch)
tree478b43713319abfa4db40e394c44a87261144a01
parent96eef4873443f17a48dc476e38e0ce7c3dfb7af1 (diff)
strlcat; Hans-Joerg.Hoexer@yerbouti.franken.de
-rw-r--r--usr.sbin/ppp/ppp/alias_proxy.c6
-rw-r--r--usr.sbin/ppp/ppp/command.c4
-rw-r--r--usr.sbin/ppp/pppctl/pppctl.c4
3 files changed, 7 insertions, 7 deletions
diff --git a/usr.sbin/ppp/ppp/alias_proxy.c b/usr.sbin/ppp/ppp/alias_proxy.c
index 42a0faae310..535a364c23f 100644
--- a/usr.sbin/ppp/ppp/alias_proxy.c
+++ b/usr.sbin/ppp/ppp/alias_proxy.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: alias_proxy.c,v 1.12 2003/04/04 20:25:06 deraadt Exp $
+ * $OpenBSD: alias_proxy.c,v 1.13 2003/04/04 20:28:57 deraadt Exp $
*/
/* file: alias_proxy.c
@@ -306,11 +306,11 @@ ProxyEncodeTcpStream(struct alias_link *link,
switch (slen % 2)
{
case 0:
- strcat(buffer, " \n");
+ strlcat(buffer, " \n", sizeof(buffer));
slen += 2;
break;
case 1:
- strcat(buffer, "\n");
+ strlcat(buffer, "\n", sizeof(buffer));
slen += 1;
}
diff --git a/usr.sbin/ppp/ppp/command.c b/usr.sbin/ppp/ppp/command.c
index d24da1d7da5..9f010d3e7db 100644
--- a/usr.sbin/ppp/ppp/command.c
+++ b/usr.sbin/ppp/ppp/command.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: command.c,v 1.77 2002/06/15 08:02:00 brian Exp $
+ * $OpenBSD: command.c,v 1.78 2003/04/04 20:28:57 deraadt Exp $
*/
#include <sys/param.h>
@@ -1160,7 +1160,7 @@ command_Run(struct bundle *bundle, int argc, char const *const *argv,
if (label) {
strncpy(buf, label, sizeof buf - 3);
buf[sizeof buf - 3] = '\0';
- strcat(buf, ": ");
+ strlcat(buf, ": ", sizeof buf);
n = strlen(buf);
} else {
*buf = '\0';
diff --git a/usr.sbin/ppp/pppctl/pppctl.c b/usr.sbin/ppp/pppctl/pppctl.c
index 2a6e2282ad0..fd35621ecfc 100644
--- a/usr.sbin/ppp/pppctl/pppctl.c
+++ b/usr.sbin/ppp/pppctl/pppctl.c
@@ -23,7 +23,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: pppctl.c,v 1.10 2003/04/04 20:25:06 deraadt Exp $
+ * $Id: pppctl.c,v 1.11 2003/04/04 20:28:57 deraadt Exp $
*/
#include <sys/types.h>
@@ -452,7 +452,7 @@ main(int argc, char **argv)
*next = '\0';
strlcpy(Buffer, start, sizeof Buffer);
Buffer[sizeof(Buffer)-2] = '\0';
- strcat(Buffer, "\n");
+ strlcat(Buffer, "\n", sizeof Buffer);
if (verbose)
write(1, Buffer, strlen(Buffer));
write(fd, Buffer, strlen(Buffer));