Fix segfault with empty fields as last in the config.
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
925bfca5d3
commit
184693f4af
2 changed files with 5 additions and 0 deletions
|
@ -279,6 +279,9 @@ static int asn1_cb(const char *elem, int len, void *bitstr)
|
|||
|
||||
int tmp_tag, tmp_class;
|
||||
|
||||
if (elem == NULL)
|
||||
return 0;
|
||||
|
||||
for (i = 0, p = elem; i < len; p++, i++) {
|
||||
/* Look for the ':' in name value pairs */
|
||||
if (*p == ':') {
|
||||
|
|
|
@ -103,6 +103,8 @@ int ENGINE_set_default(ENGINE *e, unsigned int flags)
|
|||
static int int_def_cb(const char *alg, int len, void *arg)
|
||||
{
|
||||
unsigned int *pflags = arg;
|
||||
if (alg == NULL)
|
||||
return 0;
|
||||
if (!strncmp(alg, "ALL", len))
|
||||
*pflags |= ENGINE_METHOD_ALL;
|
||||
else if (!strncmp(alg, "RSA", len))
|
||||
|
|
Loading…
Reference in a new issue