Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1745817550, "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":"c5e7937874c7bbae4320162242c3ed4e", "commit": {"type":"commit", "time": 1594826280, "time_ofs": 60, "oid_tree": { "oid": "280b56d143d2404dfa6782a6517017230aeb0044", "alias": []}, "oid":{ "oid": "dfa94239833094b9b2648aa36be3146a416b25f8", "alias": []}, "msg": "coverity: missing malloc return check", "sig_commit": { "git_time": { "time": 1594826280, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1594708644, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "coverity: missing malloc return check\n\nThis is only coming at vhost startup, for a server that's before we\ngo busy with heap. But still, it should be checked." , "diff": "diff --git a/plugins/protocol_lws_server_status.c b/plugins/protocol_lws_server_status.c\nindex 3bb57b0..ab9a797 100644\n--- a/plugins/protocol_lws_server_status.c\n+++ b/plugins/protocol_lws_server_status.c\n@@ -152,6 +152,8 @@ callback_lws_server_status(struct lws *wsi, enum lws_callback_reasons reason,\n \t\t\t\tv-\u003eperiod_s \u003d 5;\n \t\t\tif (!strcmp(pvo-\u003ename, \u0022filepath\u0022)) {\n \t\t\t\tfp \u003d malloc(sizeof(*fp));\n+\t\t\t\tif (!fp)\n+\t\t\t\t\treturn -1;\n \t\t\t\tfp-\u003enext \u003d NULL;\n \t\t\t\tlws_snprintf(\u0026fp-\u003efilepath[0],\n \t\t\t\t\t sizeof(fp-\u003efilepath), \u0022%s\u0022,\n","s":{"c":1745817550,"u": 1715}} ],"g": 2971,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}