Blame SOURCES/openssl-1.0.2k-cve-2017-3735.patch

450916
diff -up openssl-1.0.2k/crypto/x509v3/v3_addr.c.overread openssl-1.0.2k/crypto/x509v3/v3_addr.c
450916
--- openssl-1.0.2k/crypto/x509v3/v3_addr.c.overread	2017-01-26 14:22:04.000000000 +0100
450916
+++ openssl-1.0.2k/crypto/x509v3/v3_addr.c	2018-06-18 13:49:30.001625137 +0200
450916
@@ -130,10 +130,12 @@ static int length_from_afi(const unsigne
450916
  */
450916
 unsigned int v3_addr_get_afi(const IPAddressFamily *f)
450916
 {
450916
-    return ((f != NULL &&
450916
-             f->addressFamily != NULL && f->addressFamily->data != NULL)
450916
-            ? ((f->addressFamily->data[0] << 8) | (f->addressFamily->data[1]))
450916
-            : 0);
450916
+    if (f == NULL
450916
+            || f->addressFamily == NULL
450916
+            || f->addressFamily->data == NULL
450916
+            || f->addressFamily->length < 2)
450916
+        return 0;
450916
+    return (f->addressFamily->data[0] << 8) | f->addressFamily->data[1];
450916
 }
450916
 
450916
 /*