From 750d86a4fc04f53024575d65269281ea6c4e450c Mon Sep 17 00:00:00 2001 From: beck <> Date: Wed, 16 Apr 2014 20:36:35 +0000 Subject: Clean up dangerous strncpy use. This included a use where the resulting string was potentially not nul terminated and a place where malloc return was unchecked. while we're at it remove dummytest.c ok miod@ --- src/lib/libcrypto/evp/evp_key.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/lib/libcrypto/evp/evp_key.c') diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index 7961fbebf2..b3cb0638fa 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c @@ -72,8 +72,7 @@ void EVP_set_pw_prompt(const char *prompt) prompt_string[0]='\0'; else { - strncpy(prompt_string,prompt,79); - prompt_string[79]='\0'; + strlcpy(prompt_string,prompt,sizeof(prompt_string)); } } -- cgit v1.2.3-55-g6feb