[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Kurt Roeckx
kurt at openssl.org
Sat Jan 24 13:57:48 UTC 2015
The branch OpenSSL_1_0_2-stable has been updated
via 63c1d16bb85566fa3cdb13df321037a22f117957 (commit)
from 6fa805f516f5a6ff3872f1d1014a3dc9de460b99 (commit)
- Log -----------------------------------------------------------------
commit 63c1d16bb85566fa3cdb13df321037a22f117957
Author: Kurt Roeckx <kurt at roeckx.be>
Date: Sat Jan 24 14:46:50 2015 +0100
Fix segfault with empty fields as last in the config.
Reviewed-by: Tim Hudson <tjh at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/asn1/asn1_gen.c | 3 +++
crypto/engine/eng_fat.c | 2 ++
ssl/ssl_conf.c | 2 ++
ssl/t1_lib.c | 4 ++++
4 files changed, 11 insertions(+)
diff --git a/crypto/asn1/asn1_gen.c b/crypto/asn1/asn1_gen.c
index 132a9ef..aaec009 100644
--- a/crypto/asn1/asn1_gen.c
+++ b/crypto/asn1/asn1_gen.c
@@ -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 == ':') {
diff --git a/crypto/engine/eng_fat.c b/crypto/engine/eng_fat.c
index bcb4c44..4279dd9 100644
--- a/crypto/engine/eng_fat.c
+++ b/crypto/engine/eng_fat.c
@@ -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))
diff --git a/ssl/ssl_conf.c b/ssl/ssl_conf.c
index 0ee6e46..d950242 100644
--- a/ssl/ssl_conf.c
+++ b/ssl/ssl_conf.c
@@ -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++;
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c
index 90ef867..2c3a1ec 100644
--- a/ssl/t1_lib.c
+++ b/ssl/t1_lib.c
@@ -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))
More information about the openssl-commits
mailing list