doc/share/security/patches/SA-17:11/openssl-10.patch
2017-11-29 06:13:15 +00:00

19 lines
632 B
Diff

--- crypto/openssl/crypto/x509v3/v3_addr.c.orig
+++ crypto/openssl/crypto/x509v3/v3_addr.c
@@ -130,10 +130,12 @@
*/
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];
}
/*