Project homepage Mailing List  Warmcat.com  API Docs  Github Mirror 
{"schema":"libjg2-1", "vpath":"/git/", "avatar":"/git/avatar/", "alang":"", "gen_ut":1753076956, "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":"fc04735d0032447d0f84b53779d2d49c", "commit": {"type":"commit", "time": 1624708993, "time_ofs": 60, "oid_tree": { "oid": "d83316e578f948a56c75532f5d7bd72cccd9d5cc", "alias": []}, "oid":{ "oid": "576bed631fe94e249285598608c79e9010559f48", "alias": []}, "msg": "sspc: close: differentiate between ss and sspc at final wsi close", "sig_commit": { "git_time": { "time": 1624708993, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }, "sig_author": { "git_time": { "time": 1624695741, "offset": 60 }, "name": "Andy Green", "email": "andy@warmcat.com", "md5": "c50933ca2aa61e0fe2c43d46bb6b59cb" }}, "body": "sspc: close: differentiate between ss and sspc at final wsi close\n\nA second chunk of ss / sspc handling did not get cleaned up\nalong with the other patch from a few weeks ago, it wrongly\ntreats sspc the same as ss. This can cause the wrong thing\nto be zeroed down, 64-bit and 32-bit builds end up with\ndifferent victims.\n\nThis patch makes it understand the difference and treat them\naccordingly, same as the main for_ss handling.\n" , "diff": "diff --git a/lib/core-net/close.c b/lib/core-net/close.c\nindex 9c0ec1f..9f9cdf8 100644\n--- a/lib/core-net/close.c\n+++ b/lib/core-net/close.c\n@@ -214,14 +214,28 @@ __lws_free_wsi(struct lws *wsi)\n \n #if defined(LWS_WITH_SECURE_STREAMS)\n \tif (wsi-\u003efor_ss) {\n-\t\t/*\n-\t\t * Make certain it is disconnected from the ss by now\n-\t\t */\n-\t\tlws_ss_handle_t *h \u003d (lws_ss_handle_t *)wsi-\u003ea.opaque_user_data;\n \n-\t\tif (h) {\n-\t\t\th-\u003ewsi \u003d NULL;\n-\t\t\twsi-\u003ea.opaque_user_data \u003d NULL;\n+#if defined(LWS_WITH_SECURE_STREAMS_PROXY_API)\n+\t\tif (wsi-\u003eclient_bound_sspc) {\n+\t\t\tlws_sspc_handle_t *h \u003d (lws_sspc_handle_t *)\n+\t\t\t\t\t\t\twsi-\u003ea.opaque_user_data;\n+\t\t\tif (h) {\n+\t\t\t\th-\u003ecwsi \u003d NULL;\n+\t\t\t\twsi-\u003ea.opaque_user_data \u003d NULL;\n+\t\t\t}\n+\t\t} else\n+#endif\n+\t\t{\n+\t\t\t/*\n+\t\t\t * Make certain it is disconnected from the ss by now\n+\t\t\t */\n+\t\t\tlws_ss_handle_t *h \u003d (lws_ss_handle_t *)\n+\t\t\t\t\t\t\twsi-\u003ea.opaque_user_data;\n+\n+\t\t\tif (h) {\n+\t\t\t\th-\u003ewsi \u003d NULL;\n+\t\t\t\twsi-\u003ea.opaque_user_data \u003d NULL;\n+\t\t\t}\n \t\t}\n \t}\n #endif\n","s":{"c":1753076956,"u": 1846}} ],"g": 3234,"chitpc": 0,"ehitpc": 0,"indexed":0 , "ab": 0, "si": 0, "db":0, "di":0, "sat":0, "lfc": "0000"}