From d5fb7c51c79a84e58ebc5d6258547c4dbda026a9 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Sat, 14 Aug 1999 19:59:54 +0000 Subject: [PATCH] (crypt_md5): don't use snprintf git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@6815 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/des/fcrypt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/des/fcrypt.c b/lib/des/fcrypt.c index 629bada22..d6beca3ab 100644 --- a/lib/des/fcrypt.c +++ b/lib/des/fcrypt.c @@ -207,8 +207,8 @@ crypt_md5(pw, salt) MD5Update(&ctx, pw+j, 1); /* Now make the output string */ - snprintf (passwd, sizeof(passwd), - "%s%.*s$", magic, sl, sp); + strcpy(passwd, magic); /* sizeof(passwd) > sizeof(magic) */ + strncat(passwd, sp, sl); /* ok, since sl <= 8 */ MD5Final(final,&ctx);