summaryrefslogtreecommitdiffstats
path: root/crypto/core_namemap.c
diff options
context:
space:
mode:
authorPW Hu <jlu.hpw@foxmail.com>2021-11-10 12:39:54 +0800
committerTomas Mraz <tomas@openssl.org>2021-11-22 11:17:48 +0100
commit2349d7ba57c9327290df6f7bc18b7f0c3976ca9e (patch)
tree665b40724ec43bd912f90de936e06e4c890f9bdd /crypto/core_namemap.c
parent615a9b8798e6ec58f1b2e1ec08a0f6b3c8cb7f60 (diff)
Fix the return check of OBJ_obj2txt
Also update OBJ_nid2obj.pod to document the possible return values. Reviewed-by: Paul Dale <pauli@openssl.org> Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17005)
Diffstat (limited to 'crypto/core_namemap.c')
-rw-r--r--crypto/core_namemap.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/core_namemap.c b/crypto/core_namemap.c
index 415df3d839..e1da724bd2 100644
--- a/crypto/core_namemap.c
+++ b/crypto/core_namemap.c
@@ -397,7 +397,7 @@ static void get_legacy_evp_names(int base_nid, int nid, const char *pem_name,
if ((obj = OBJ_nid2obj(nid)) != NULL) {
char txtoid[OSSL_MAX_NAME_SIZE];
- if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1))
+ if (OBJ_obj2txt(txtoid, sizeof(txtoid), obj, 1) > 0)
num = ossl_namemap_add_name(arg, num, txtoid);
}
}