diff options
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/x509/x509_addr.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/x509/x509_addr.c b/src/lib/libcrypto/x509/x509_addr.c index 64dd830514..fda73b304e 100644 --- a/src/lib/libcrypto/x509/x509_addr.c +++ b/src/lib/libcrypto/x509/x509_addr.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: x509_addr.c,v 1.29 2021/12/28 15:49:11 tb Exp $ */ | 1 | /* $OpenBSD: x509_addr.c,v 1.30 2021/12/28 15:59:13 tb Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Contributed to the OpenSSL Project by the American Registry for | 3 | * Contributed to the OpenSSL Project by the American Registry for |
| 4 | * Internet Numbers ("ARIN"). | 4 | * Internet Numbers ("ARIN"). |
| @@ -354,6 +354,10 @@ X509v3_addr_get_afi(const IPAddressFamily *f) | |||
| 354 | if (!CBS_get_u16(&cbs, &afi)) | 354 | if (!CBS_get_u16(&cbs, &afi)) |
| 355 | return 0; | 355 | return 0; |
| 356 | 356 | ||
| 357 | /* One byte for the optional SAFI, everything else is garbage. */ | ||
| 358 | if (CBS_len(&cbs) > 1) | ||
| 359 | return 0; | ||
| 360 | |||
| 357 | return afi; | 361 | return afi; |
| 358 | } | 362 | } |
| 359 | 363 | ||
