Fix a missing return value check in v3_addr
authorMatt Caswell <matt@openssl.org>
Fri, 15 Apr 2016 13:45:12 +0000 (14:45 +0100)
committerMatt Caswell <matt@openssl.org>
Thu, 21 Apr 2016 09:51:57 +0000 (10:51 +0100)
All other instances of extract_min_max are checked for an error return,
except this one.

Reviewed-by: Richard Levitte <levitte@openssl.org>
crypto/x509v3/v3_addr.c

index 49d0d4d..f68f937 100644 (file)
@@ -897,7 +897,8 @@ static int IPAddressOrRanges_canonize(IPAddressOrRanges *aors,
         IPAddressOrRange *a = sk_IPAddressOrRange_value(aors, j);
         if (a != NULL && a->type == IPAddressOrRange_addressRange) {
             unsigned char a_min[ADDR_RAW_BUF_LEN], a_max[ADDR_RAW_BUF_LEN];
-            extract_min_max(a, a_min, a_max, length);
+            if (!extract_min_max(a, a_min, a_max, length))
+                return 0;
             if (memcmp(a_min, a_max, length) > 0)
                 return 0;
         }