diff options
author | Richard Levitte <levitte@openssl.org> | 2002-02-28 12:42:19 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2002-02-28 12:42:19 +0000 |
commit | 26414ee013170f2d8e42b1995dbb30c03e7ed16c (patch) | |
tree | 8c063e88267e1cc018fb3a71a74b35962249702f /crypto/evp/evp_key.c | |
parent | 5c62f68e14f38101e2a1dd969b1d5f587a16bfdb (diff) | |
download | openssl-26414ee013170f2d8e42b1995dbb30c03e7ed16c.tar.gz |
Increase internal security when using strncpy, by making sure the resulting string is NUL-terminated
Diffstat (limited to 'crypto/evp/evp_key.c')
-rw-r--r-- | crypto/evp/evp_key.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/crypto/evp/evp_key.c b/crypto/evp/evp_key.c index 9d9b0af8de..4271393069 100644 --- a/crypto/evp/evp_key.c +++ b/crypto/evp/evp_key.c @@ -71,7 +71,10 @@ void EVP_set_pw_prompt(char *prompt) if (prompt == NULL) prompt_string[0]='\0'; else + { strncpy(prompt_string,prompt,79); + prompt_string[79]='\0'; + } } char *EVP_get_pw_prompt(void) |