Increase internal security when using strncpy, by making sure the resulting string is NUL-terminated
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user