summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2002-01-22 23:25:30 +1100
committerDamien Miller <djm@mindrot.org>2002-01-22 23:25:30 +1100
commit73f18346bc1d8ab6f069e8add07af7f6851765e4 (patch)
tree4cc51095bd742b1012422fdf99f638cc45586d9d
parent209ee4e3680d1a965cf42b0c13068536a4984fd0 (diff)
- markus@cvs.openbsd.org 2002/01/11 23:26:30
[auth-skey.c] use snprintf; mouring@
-rw-r--r--ChangeLog5
-rw-r--r--auth-skey.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 0a3ebd8b..406b8e2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -146,6 +146,9 @@
- markus@cvs.openbsd.org 2002/01/11 23:02:51
[auth2-chall.c]
use snprintf; mouring@
+ - markus@cvs.openbsd.org 2002/01/11 23:26:30
+ [auth-skey.c]
+ use snprintf; mouring@
20020121
@@ -7294,4 +7297,4 @@
- Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1
-$Id: ChangeLog,v 1.1764 2002/01/22 12:25:08 djm Exp $
+$Id: ChangeLog,v 1.1765 2002/01/22 12:25:30 djm Exp $
diff --git a/auth-skey.c b/auth-skey.c
index fd0fcfc9..d98fa6b0 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -22,7 +22,7 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include "includes.h"
-RCSID("$OpenBSD: auth-skey.c,v 1.14 2002/01/11 20:14:11 markus Exp $");
+RCSID("$OpenBSD: auth-skey.c,v 1.15 2002/01/11 23:26:30 markus Exp $");
#ifdef SKEY
@@ -60,8 +60,7 @@ skey_query(void *ctx, char **name, char **infotxt,
len = strlen(challenge) + strlen(PROMPT) + 1;
p = xmalloc(len);
- strlcpy(p, challenge, len);
- strlcat(p, PROMPT, len);
+ snprintf(p, len, "%s%s", challenge, PROMPT);
(*prompts)[0] = p;
return 0;