summaryrefslogtreecommitdiff
path: root/thirdparty/openssl/crypto/x509v3/v3_addr.c
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2018-01-13 13:39:08 +0100
committerRémi Verschelde <rverschelde@gmail.com>2018-01-13 13:39:08 +0100
commit00abb1f201cbe1e40c2eef30819be115d3d04d10 (patch)
tree7eb36871dd7af02db7d2f59482644a56bc79d7bb /thirdparty/openssl/crypto/x509v3/v3_addr.c
parentde0b31edd5b36b8c8016b7ca50c1823f2efbfa74 (diff)
openssl: Update to pristine 1.0.2n (security update)
Diffstat (limited to 'thirdparty/openssl/crypto/x509v3/v3_addr.c')
-rw-r--r--thirdparty/openssl/crypto/x509v3/v3_addr.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/thirdparty/openssl/crypto/x509v3/v3_addr.c b/thirdparty/openssl/crypto/x509v3/v3_addr.c
index 1290dec9bb..af080a04f2 100644
--- a/thirdparty/openssl/crypto/x509v3/v3_addr.c
+++ b/thirdparty/openssl/crypto/x509v3/v3_addr.c
@@ -130,10 +130,12 @@ static int length_from_afi(const unsigned afi)
*/
unsigned int v3_addr_get_afi(const IPAddressFamily *f)
{
- return ((f != NULL &&
- f->addressFamily != NULL && f->addressFamily->data != NULL)
- ? ((f->addressFamily->data[0] << 8) | (f->addressFamily->data[1]))
- : 0);
+ if (f == NULL
+ || f->addressFamily == NULL
+ || f->addressFamily->data == NULL
+ || f->addressFamily->length < 2)
+ return 0;
+ return (f->addressFamily->data[0] << 8) | f->addressFamily->data[1];
}
/*