Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1749731006, "reponame":"libwebsockets", "desc":"libwebsockets lightweight C networking library", "owner": { "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },"url":"https://libwebsockets.org/repo/libwebsockets", "f":3, "items": [ {"schema":"libjg2-1", "cid":"71ef12b4df43d286e7a3408e167c06b1", "commit": {"type":"commit", "time": 1636379085, "time_ofs": 0, "oid_tree": { "oid": "1a14053238ac721d46bc5b015b8f0a5683b251d4", "alias": []}, "oid":{ "oid": "81a69d10e9ab2d3e668b99663405f9a1744de3b6", "alias": []}, "msg": "jit-trust: show coverity we handle NULL attribute source", "sig_commit": { "git_time": { "time": 1636379085, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1636363679, "offset": 0 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "jit-trust: show coverity we handle NULL attribute source\n\nCoverity doesn't understand that since we already handled\nakid.keyIdentifier.MBEDTLS_PRIVATE(len) being zero, we don't need to\ncheck for akid.keyIdentifier.MBEDTLS_PRIVATE(p) being NULL.\n\nSo explicitly check it, even though it is a NOP.\n\n" , "diff": "diff --git a/lib/tls/mbedtls/mbedtls-x509.c b/lib/tls/mbedtls/mbedtls-x509.c\nindex e20e07f..b6d944d 100644\n--- a/lib/tls/mbedtls/mbedtls-x509.c\n+++ b/lib/tls/mbedtls/mbedtls-x509.c\n@@ -202,7 +202,8 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_crt *x509, enum lws_tls_cert_info type,\n \t\tif (akid.keyIdentifier.MBEDTLS_PRIVATE(tag) !\u003d MBEDTLS_ASN1_OCTET_STRING)\n \t\t\treturn 1;\n \t\tbuf-\u003ens.len \u003d (int)akid.keyIdentifier.MBEDTLS_PRIVATE(len);\n-\t\tif (len \u003c (size_t)buf-\u003ens.len)\n+\t\tif (!akid.keyIdentifier.MBEDTLS_PRIVATE(p) ||\n+\t\t len \u003c (size_t)buf-\u003ens.len)\n \t\t\treturn -1;\n \t\tmemcpy(buf-\u003ens.name, akid.keyIdentifier.MBEDTLS_PRIVATE(p), (size_t)buf-\u003ens.len);\n \t\tbreak;\n@@ -224,6 +225,7 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_crt *x509, enum lws_tls_cert_info type,\n \n \t\twhile (ip) {\n \t\t\tif (akid.keyIdentifier.MBEDTLS_PRIVATE(tag) !\u003d MBEDTLS_ASN1_OCTET_STRING ||\n+\t\t\t !ip-\u003eMBEDTLS_PRIVATE(buf).MBEDTLS_PRIVATE(p) ||\n \t\t\t ip-\u003eMBEDTLS_PRIVATE(buf).MBEDTLS_PRIVATE(len) \u003c 9 ||\n \t\t\t len \u003c (size_t)ip-\u003eMBEDTLS_PRIVATE(buf).MBEDTLS_PRIVATE(len) - 9u)\n \t\t\tbreak;\n@@ -246,7 +248,8 @@ lws_tls_mbedtls_cert_info(mbedtls_x509_crt *x509, enum lws_tls_cert_info type,\n \t\tif (akid.authorityCertSerialNumber.MBEDTLS_PRIVATE(tag) !\u003d MBEDTLS_ASN1_OCTET_STRING)\n \t\t\treturn 1;\n \t\tbuf-\u003ens.len \u003d (int)akid.authorityCertSerialNumber.MBEDTLS_PRIVATE(len);\n-\t\tif (len \u003c (size_t)buf-\u003ens.len)\n+\t\tif (!akid.authorityCertSerialNumber.MBEDTLS_PRIVATE(p) ||\n+\t\t len \u003c (size_t)buf-\u003ens.len)\n \t\t\treturn -1;\n \t\tmemcpy(buf-\u003ens.name, akid.authorityCertSerialNumber.\n \t\t\t\t\tMBEDTLS_PRIVATE(p), (size_t)buf-\u003ens.len);\n","s":{"c":1749731006,"u": 5591}} ],"g": 7042,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}