diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-13 09:09:52 +0000 |
commit | cd64a50f546ecbfd25035373ee745bd04e4e5905 (patch) | |
tree | 86a1452cec538b8f5259a45745e95cd1161d04e7 /sbin/routed/table.c | |
parent | 6153e3b8d9aedd43b1300c4d60217039c9485e02 (diff) |
lots of sprintf -> snprintf and strcpy -> strlcpy; checked by tedu
Diffstat (limited to 'sbin/routed/table.c')
-rw-r--r-- | sbin/routed/table.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/routed/table.c b/sbin/routed/table.c index 44a82e2555f..1f0075ea849 100644 --- a/sbin/routed/table.c +++ b/sbin/routed/table.c @@ -1,4 +1,4 @@ -/* $OpenBSD: table.c,v 1.9 2003/03/13 06:10:49 deraadt Exp $ */ +/* $OpenBSD: table.c,v 1.10 2003/03/13 09:09:27 deraadt Exp $ */ /* * Copyright (c) 1983, 1988, 1993 @@ -1088,7 +1088,8 @@ read_rt(void) continue; } - strcpy(str, rtm_type_name(m.r.rtm.rtm_type)); + strlcpy(str, rtm_type_name(m.r.rtm.rtm_type), + sizeof str); strp = &str[strlen(str)]; if (m.r.rtm.rtm_type <= RTM_CHANGE) strp += sprintf(strp," from pid %ld", (long)m.r.rtm.rtm_pid); |