diff options
-rw-r--r-- | src/lib/libcrypto/asn1/a_object.c | 5 | ||||
-rw-r--r-- | src/lib/libcrypto/objects/obj_dat.c | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/src/lib/libcrypto/asn1/a_object.c b/src/lib/libcrypto/asn1/a_object.c index 8c8ca8537f..af19858f74 100644 --- a/src/lib/libcrypto/asn1/a_object.c +++ b/src/lib/libcrypto/asn1/a_object.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: a_object.c,v 1.49 2022/11/26 16:08:50 tb Exp $ */ | 1 | /* $OpenBSD: a_object.c,v 1.50 2023/05/23 11:51:12 tb 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 | * |
@@ -433,6 +433,9 @@ i2t_ASN1_OBJECT_internal(const ASN1_OBJECT *aobj, char *buf, int buf_len, int no | |||
433 | if (buf_len > 0) | 433 | if (buf_len > 0) |
434 | buf[0] = '\0'; | 434 | buf[0] = '\0'; |
435 | 435 | ||
436 | if (aobj == NULL || aobj->data == NULL) | ||
437 | return 0; | ||
438 | |||
436 | if (!CBB_init(&cbb, 0)) | 439 | if (!CBB_init(&cbb, 0)) |
437 | goto err; | 440 | goto err; |
438 | if (!i2t_ASN1_OBJECT_cbb(aobj, &cbb, no_name)) | 441 | if (!i2t_ASN1_OBJECT_cbb(aobj, &cbb, no_name)) |
diff --git a/src/lib/libcrypto/objects/obj_dat.c b/src/lib/libcrypto/objects/obj_dat.c index fcc21ddfb4..7516a6d09a 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.52 2023/05/23 11:04:04 tb Exp $ */ | 1 | /* $OpenBSD: obj_dat.c,v 1.53 2023/05/23 11:51:12 tb 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 | * |
@@ -499,12 +499,6 @@ OBJ_txt2obj(const char *s, int no_name) | |||
499 | int | 499 | int |
500 | OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *aobj, int no_name) | 500 | OBJ_obj2txt(char *buf, int buf_len, const ASN1_OBJECT *aobj, int no_name) |
501 | { | 501 | { |
502 | if (buf_len > 0) | ||
503 | buf[0] = '\0'; | ||
504 | |||
505 | if (aobj == NULL || aobj->data == NULL) | ||
506 | return 0; | ||
507 | |||
508 | return i2t_ASN1_OBJECT_internal(aobj, buf, buf_len, no_name); | 502 | return i2t_ASN1_OBJECT_internal(aobj, buf, buf_len, no_name); |
509 | } | 503 | } |
510 | 504 | ||