Fix segfault with empty fields as last in the config.
Reviewed-by: Tim Hudson <tjh@openssl.org>
This commit is contained in:
parent
6fa805f516
commit
63c1d16bb8
@ -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))
|
||||
|
@ -167,6 +167,8 @@ static int ssl_set_option_list(const char *elem, int len, void *usr)
|
||||
* len == -1 indicates not being called in list context, just for single
|
||||
* command line switches, so don't allow +, -.
|
||||
*/
|
||||
if (elem == NULL)
|
||||
return 0;
|
||||
if (len != -1) {
|
||||
if (*elem == '+') {
|
||||
elem++;
|
||||
|
@ -651,6 +651,8 @@ static int nid_cb(const char *elem, int len, void *arg)
|
||||
size_t i;
|
||||
int nid;
|
||||
char etmp[20];
|
||||
if (elem == NULL)
|
||||
return 0;
|
||||
if (narg->nidcnt == MAX_CURVELIST)
|
||||
return 0;
|
||||
if (len > (int)(sizeof(etmp) - 1))
|
||||
@ -3948,6 +3950,8 @@ static int sig_cb(const char *elem, int len, void *arg)
|
||||
size_t i;
|
||||
char etmp[20], *p;
|
||||
int sig_alg, hash_alg;
|
||||
if (elem == NULL)
|
||||
return 0;
|
||||
if (sarg->sigalgcnt == MAX_SIGALGLEN)
|
||||
return 0;
|
||||
if (len > (int)(sizeof(etmp) - 1))
|
||||
|
Loading…
x
Reference in New Issue
Block a user