summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2003-04-28 17:36:57 +0000
committerBob Beck <beck@cvs.openbsd.org>2003-04-28 17:36:57 +0000
commit4a286b553b0be7eaf33642d37e4ab5f5d713df39 (patch)
treed832bb7abb9b7185fa8b492ee69ce1df81a81766 /usr.sbin/ppp
parent518623f9c8fef1de7bb756f6494f056364d5b45f (diff)
strings. tdeval and I finally agree on this :)
ok tdeval@
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/ppp/ipcp.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/ppp/ppp/ipcp.c b/usr.sbin/ppp/ppp/ipcp.c
index 4d34cf12839..4a109b3ed59 100644
--- a/usr.sbin/ppp/ppp/ipcp.c
+++ b/usr.sbin/ppp/ppp/ipcp.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: ipcp.c,v 1.37 2002/06/15 08:02:00 brian Exp $
+ * $OpenBSD: ipcp.c,v 1.38 2003/04/28 17:36:56 beck Exp $
*/
#include <sys/param.h>
@@ -251,7 +251,8 @@ ipcp_LoadDNS(struct ipcp *ipcp)
else
cp++;
}
- strcpy(cp_nons, cp); /* Copy the end - including the NUL */
+ strlcpy(cp_nons, cp, st.st_size + 1 - (cp_nons -
+ ipcp->ns.resolv_nons)); /* Copy the end - including the NUL */
cp_nons += strlen(cp_nons) - 1;
while (cp_nons >= ipcp->ns.resolv_nons && *cp_nons == '\n')
*cp_nons-- = '\0';