diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-17 22:28:59 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2007-03-17 22:28:59 +0000 |
commit | 180ac8efb8b9657f4af16e441b36ba2db04b5cbc (patch) | |
tree | 92c6c8d8cb56dec694a3b78324435f18fbbe3771 | |
parent | dd7da3ede1c18738ec54138e10314851585ee5be (diff) |
Exchange a strlcpy() with a strncpy(). A similar change was done in parse.y
some time ago. The simple password needs to be nul extended and is allowed
to fill the full buffer the perfect job for stncpy().
Found and tested by Jon Morby.
-rw-r--r-- | usr.sbin/ospfd/ospfd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ospfd/ospfd.c b/usr.sbin/ospfd/ospfd.c index a785401edc9..07d8e971340 100644 --- a/usr.sbin/ospfd/ospfd.c +++ b/usr.sbin/ospfd/ospfd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ospfd.c,v 1.42 2007/03/16 10:56:31 claudio Exp $ */ +/* $OpenBSD: ospfd.c,v 1.43 2007/03/17 22:28:58 claudio Exp $ */ /* * Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org> @@ -765,7 +765,7 @@ merge_interfaces(struct area *a, struct area *xa) i->linkstate = xi->linkstate; /* needed? */ i->auth_type = xi->auth_type; - strlcpy(i->auth_key, xi->auth_key, MAX_SIMPLE_AUTH_LEN); + strncpy(i->auth_key, xi->auth_key, MAX_SIMPLE_AUTH_LEN); md_list_clr(&i->auth_md_list); md_list_copy(&i->auth_md_list, &xi->auth_md_list); |