mirror of
https://github.com/openssl/openssl.git
synced 2024-11-27 05:21:51 +08:00
p_get_params() [test/p_test.c]: clear the OSSL_PARAM buffers for every test
Fixes #8796 Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/8851)
This commit is contained in:
parent
b6a07f6760
commit
1ccf49737c
@ -55,10 +55,10 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[])
|
||||
|
||||
for (; ok && p->key != NULL; p++) {
|
||||
if (strcmp(p->key, "greeting") == 0) {
|
||||
static char *opensslv = NULL;
|
||||
static char *provname = NULL;
|
||||
static char *greeting = NULL;
|
||||
static OSSL_PARAM counter_request[] = {
|
||||
static char *opensslv;
|
||||
static char *provname;
|
||||
static char *greeting;
|
||||
static const OSSL_PARAM counter_request[] = {
|
||||
/* Known libcrypto provided parameters */
|
||||
{ "openssl-version", OSSL_PARAM_UTF8_PTR,
|
||||
&opensslv, sizeof(&opensslv), NULL },
|
||||
@ -74,6 +74,8 @@ static int p_get_params(void *vprov, const OSSL_PARAM params[])
|
||||
char buf[256];
|
||||
size_t buf_l;
|
||||
|
||||
opensslv = provname = greeting = NULL;
|
||||
|
||||
if (c_get_params(prov, counter_request)) {
|
||||
if (greeting) {
|
||||
strcpy(buf, greeting);
|
||||
|
Loading…
Reference in New Issue
Block a user