OSSL_PARAM example code bug fix.
Technically not a bug since the code worked but the array index shouldn't have been constant after searching for the field. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/9136)
This commit is contained in:
parent
a2e520447e
commit
c79b6b874b
1 changed files with 2 additions and 2 deletions
|
@ -276,8 +276,8 @@ could fill in the parameters like this:
|
||||||
*(char **)params[i].data = "foo value";
|
*(char **)params[i].data = "foo value";
|
||||||
*params[i].return_size = 10; /* size of "foo value" */
|
*params[i].return_size = 10; /* size of "foo value" */
|
||||||
} else if (strcmp(params[i].key, "bar") == 0) {
|
} else if (strcmp(params[i].key, "bar") == 0) {
|
||||||
memcpy(params[1].data, "bar value", 10);
|
memcpy(params[i].data, "bar value", 10);
|
||||||
*params[1].return_size = 10; /* size of "bar value" */
|
*params[i].return_size = 10; /* size of "bar value" */
|
||||||
}
|
}
|
||||||
/* Ignore stuff we don't know */
|
/* Ignore stuff we don't know */
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue