{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752332229,
"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":"f0494e32b3effcb6c69ce86e3e006134",
"commit": {"type":"commit",
"time": 1563049734,
"time_ofs": 18446744073709551196,
"oid_tree": { "oid": "8edc08bf50af34f8ed5e1ef07f266443d9d5f61b", "alias": []},
"oid":{ "oid": "cd56a4b97fac5f6b96ea1122b1fdaedece223187", "alias": []},
"msg": "COVA12046: make it clear the strdup target cannot be NULL",
"sig_commit": { "git_time": { "time": 1563049734, "offset": -420 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1563044241, "offset": -420 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "COVA12046: make it clear the strdup target cannot be NULL"
,
"diff": "diff --git a/lib/roles/http/client/client-handshake.c b/lib/roles/http/client/client-handshake.c\nindex 18b0d9a..5d230b1 100644\n--- a/lib/roles/http/client/client-handshake.c\n+++ b/lib/roles/http/client/client-handshake.c\n@@ -349,10 +349,12 @@ create_new_conn:\n \tif (!wsi-\u003ecli_hostname_copy) {\n \t\tif (wsi-\u003estash)\n \t\t\twsi-\u003ecli_hostname_copy \u003d lws_strdup(wsi-\u003estash-\u003ehost);\n-\t\telse\n-\t\t\twsi-\u003ecli_hostname_copy \u003d\n-\t\t\t\tlws_strdup(lws_hdr_simple_ptr(wsi,\n-\t\t\t\t\t_WSI_TOKEN_CLIENT_PEER_ADDRESS));\n+\t\telse {\n+\t\t\tchar *pa \u003d lws_hdr_simple_ptr(wsi,\n+\t\t\t\t\t _WSI_TOKEN_CLIENT_PEER_ADDRESS);\n+\t\t\tif (pa)\n+\t\t\t\twsi-\u003ecli_hostname_copy \u003d lws_strdup(pa);\n+\t\t}\n \t}\n \n \t/*\ndiff --git a/lib/roles/http/server/lws-spa.c b/lib/roles/http/server/lws-spa.c\nindex 6300f7d..4e25695 100644\n--- a/lib/roles/http/server/lws-spa.c\n+++ b/lib/roles/http/server/lws-spa.c\n@@ -352,7 +352,8 @@ retry_as_first:\n \t\t\tif (!s-\u003etemp[0]) {\n \t\t\t\tif (s-\u003emp \u003c (int)sizeof(s-\u003econtent_disp) - 1)\n \t\t\t\t\ts-\u003econtent_disp[s-\u003emp++] \u003d *in;\n-\t\t\t\ts-\u003econtent_disp[s-\u003emp] \u003d '\u005c0';\n+\t\t\t\tif (s-\u003emp \u003c (int)sizeof(s-\u003econtent_disp))\n+\t\t\t\t\ts-\u003econtent_disp[s-\u003emp] \u003d '\u005c0';\n \t\t\t\tgoto done;\n \t\t\t}\n \n","s":{"c":1752332229,"u": 3847}}
],"g": 4582,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}