diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 6 | 
1 files changed, 3 insertions, 3 deletions
| diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index 4f7396f669..7aecda2641 100644 --- a/src/lib/libcrypto/objects/obj_dat.c +++ b/src/lib/libcrypto/objects/obj_dat.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: obj_dat.c,v 1.45 2022/01/08 21:36:39 tb Exp $ */ | 1 | /* $OpenBSD: obj_dat.c,v 1.46 2022/02/11 16:39:16 jsing Exp $ */ | 
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 
| 3 | * All rights reserved. | 3 | * All rights reserved. | 
| 4 | * | 4 | * | 
| @@ -458,9 +458,9 @@ OBJ_obj2nid(const ASN1_OBJECT *a) | |||
| 458 | const unsigned int *op; | 458 | const unsigned int *op; | 
| 459 | ADDED_OBJ ad, *adp; | 459 | ADDED_OBJ ad, *adp; | 
| 460 | 460 | ||
| 461 | if (a == NULL) | 461 | if (a == NULL || a->length == 0) | 
| 462 | return (NID_undef); | 462 | return (NID_undef); | 
| 463 | if (a->nid != 0) | 463 | if (a->nid != NID_undef) | 
| 464 | return (a->nid); | 464 | return (a->nid); | 
| 465 | 465 | ||
| 466 | if (added != NULL) { | 466 | if (added != NULL) { | 
