{"schema":"libjg2-1",
"vpath":"/git/",
"avatar":"/git/avatar/",
"alang":"",
"gen_ut":1752654507,
"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":"beaedddda1710c5d55845f731acdcd42",
"commit": {"type":"commit",
"time": 1597817988,
"time_ofs": 60,
"oid_tree": { "oid": "959e4e4e7c612995bfab2d1f49b29ac8d95c777e", "alias": []},
"oid":{ "oid": "258ee1886f4a2005e9a6d0c810c7e40e49e6d089", "alias": []},
"msg": "coverity: 37468: confirm gethostname worked",
"sig_commit": { "git_time": { "time": 1597817988, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" },
"sig_author": { "git_time": { "time": 1597817988, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }},
"body": "coverity: 37468: confirm gethostname worked"
,
"diff": "diff --git a/lib/roles/http/server/server.c b/lib/roles/http/server/server.c\nindex 38e03c8..2e6d09b 100644\n--- a/lib/roles/http/server/server.c\n+++ b/lib/roles/http/server/server.c\n@@ -3071,8 +3071,10 @@ lws_server_get_canonical_hostname(struct lws_context *context,\n \t\treturn;\n #if !defined(LWS_PLAT_FREERTOS)\n \t/* find canonical hostname */\n-\tgethostname((char *)context-\u003ecanonical_hostname,\n-\t\t sizeof(context-\u003ecanonical_hostname) - 1);\n+\tif (gethostname((char *)context-\u003ecanonical_hostname,\n+\t\t sizeof(context-\u003ecanonical_hostname) - 1))\n+\t\tlws_strncpy((char *)context-\u003ecanonical_hostname, \u0022unknown\u0022,\n+\t\t\t sizeof(context-\u003ecanonical_hostname));\n \n \tlwsl_info(\u0022 canonical_hostname \u003d %s\u005cn\u0022, context-\u003ecanonical_hostname);\n #else\n","s":{"c":1752654507,"u": 9466}}
],"g": 10533,"chitpc": 0,"ehitpc": 0,"indexed":0
,
"ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}