Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1745564158, "reponame":"openssl", "desc":"OpenSSL", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://warmcat.com/repo/openssl", "f":3, "items": [ {"schema":"libjg2-1", "cid":"258a5d88e81c359023178ee36d8af999", "commit": {"type":"commit", "time": 1515248554, "time_ofs": 60, "oid_tree": { "oid": "ec712fa23bc624c9a20c6093f14c60dd99864f0a", "alias": []}, "oid":{ "oid": "ae880ae6719e7c850b14193b2bc0a8e401c4b2b8", "alias": []}, "msg": "Fix error handling in X509_REQ_print_ex", "sig_commit": { "git_time": { "time": 1515248554, "offset": 60 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }, "sig_author": { "git_time": { "time": 1515248506, "offset": 60 }, "name": "Bernd Edlinger", "email": "bernd.edlinger@hotmail.de", "md5": "954aa9518ec67215541482fb5302b745" }}, "body": "Fix error handling in X509_REQ_print_ex\n\nReviewed-by: Rich Salz \u003crsalz@openssl.org\u003e\n(Merged from https://github.com/openssl/openssl/pull/5025)\n" , "diff": "diff --git a/crypto/x509/t_req.c b/crypto/x509/t_req.c\nindex 7c0bd42..2fcc43e 100644\n--- a/crypto/x509/t_req.c\n+++ b/crypto/x509/t_req.c\n@@ -93,10 +93,12 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,\n \n pkey \u003d X509_REQ_get0_pubkey(x);\n if (pkey \u003d\u003d NULL) {\n- BIO_printf(bp, \u0022%12sUnable to load Public Key\u005cn\u0022, \u0022\u0022);\n+ if (BIO_printf(bp, \u0022%12sUnable to load Public Key\u005cn\u0022, \u0022\u0022) \u003c\u003d 0)\n+ goto err;\n ERR_print_errors(bp);\n } else {\n- EVP_PKEY_print_public(bp, pkey, 16, NULL);\n+ if (EVP_PKEY_print_public(bp, pkey, 16, NULL) \u003c\u003d 0)\n+ goto err;\n }\n }\n \n@@ -143,10 +145,12 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,\n if (BIO_write(bp, (char *)bs-\u003edata, bs-\u003elength)\n !\u003d bs-\u003elength)\n goto err;\n- BIO_puts(bp, \u0022\u005cn\u0022);\n+ if (BIO_puts(bp, \u0022\u005cn\u0022) \u003c\u003d 0)\n+ goto err;\n break;\n default:\n- BIO_puts(bp, \u0022unable to print attribute\u005cn\u0022);\n+ if (BIO_puts(bp, \u0022unable to print attribute\u005cn\u0022) \u003c\u003d 0)\n+ goto err;\n break;\n }\n if (++ii \u003c count)\n@@ -157,7 +161,8 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,\n if (!(cflag \u0026 X509_FLAG_NO_EXTENSIONS)) {\n exts \u003d X509_REQ_get_extensions(x);\n if (exts) {\n- BIO_printf(bp, \u0022%8sRequested Extensions:\u005cn\u0022, \u0022\u0022);\n+ if (BIO_printf(bp, \u0022%8sRequested Extensions:\u005cn\u0022, \u0022\u0022) \u003c\u003d 0)\n+ goto err;\n for (i \u003d 0; i \u003c sk_X509_EXTENSION_num(exts); i++) {\n ASN1_OBJECT *obj;\n X509_EXTENSION *ex;\n@@ -166,13 +171,16 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags,\n if (BIO_printf(bp, \u0022%12s\u0022, \u0022\u0022) \u003c\u003d 0)\n goto err;\n obj \u003d X509_EXTENSION_get_object(ex);\n- i2a_ASN1_OBJECT(bp, obj);\n+ if (i2a_ASN1_OBJECT(bp, obj) \u003c\u003d 0)\n+ goto err;\n critical \u003d X509_EXTENSION_get_critical(ex);\n if (BIO_printf(bp, \u0022: %s\u005cn\u0022, critical ? \u0022critical\u0022 : \u0022\u0022) \u003c\u003d 0)\n goto err;\n if (!X509V3_EXT_print(bp, ex, cflag, 16)) {\n- BIO_printf(bp, \u0022%16s\u0022, \u0022\u0022);\n- ASN1_STRING_print(bp, X509_EXTENSION_get_data(ex));\n+ if (BIO_printf(bp, \u0022%16s\u0022, \u0022\u0022) \u003c\u003d 0\n+ || ASN1_STRING_print(bp,\n+ X509_EXTENSION_get_data(ex)) \u003c\u003d 0)\n+ goto err;\n }\n if (BIO_write(bp, \u0022\u005cn\u0022, 1) \u003c\u003d 0)\n goto err;\n","s":{"c":1745564158,"u": 39349}} ],"g": 40904,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}