)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2724e23a183254cfd96ab68845da9ff87536a66c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":2,"id":"f8c5bf7c_3630899a","updated":"2024-07-08 16:32:44.000000000","message":"I must say that I would feel better if we had a UT covering all this. Not sure how difficult that would be?","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"de828dfd46d56b68208fafe749f6ff67711b2a9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"fbc520e7_aed75015","updated":"2024-07-08 19:27:55.000000000","message":"getting close","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2fbf58744b4bb144f83214b82b8def9765720b17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"8753232d_9dd46ee8","in_reply_to":"f8c5bf7c_3630899a","updated":"2024-07-09 16:13:27.000000000","message":"Done","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2fbf58744b4bb144f83214b82b8def9765720b17","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"7b75b33c_8c46b9bc","updated":"2024-07-09 16:13:27.000000000","message":"Thanks, addresses my concerns. However, does not actually build currently ;)","commit_id":"0531e80da3a82f95955dace00ae811768253d43b"}],"src/openvpn/forward.c":[{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"87cb49a39e9c4dfe7f6a0f1dd4c2986d0fe26d32","unresolved":true,"context_lines":[{"line_number":306,"context_line":"                struct buffer cmdbuf \u003d alloc_buf_gc(buflen, \u0026gc);"},{"line_number":307,"context_line":"                buf_write(\u0026cmdbuf, BPTR(\u0026buf), buflen);"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"                /* Remove \\r and \\n at the end of the buffer to avoid"},{"line_number":310,"context_line":"                 * problems with scripts and other that add extra \\r and \\n */"},{"line_number":311,"context_line":"                while (BLEN(\u0026cmdbuf)"},{"line_number":312,"context_line":"                       \u0026\u0026 (*(BEND(\u0026cmdbuf) - 2) \u003d\u003d \u0027\\r\u0027 || *(BEND(\u0026cmdbuf) - 2)\u003d\u003d \u0027\\n\u0027))"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"f61c55e2_9b297160","line":309,"updated":"2024-07-08 11:14:41.000000000","message":"Why can\u0027t you use buf_chomp?","commit_id":"48703d64a7234b7cf7a1319d404f9702a7a7a4e6"},{"author":{"_account_id":1000003,"name":"plaisthos","display_name":"Arne Schwabe","email":"arne-openvpn@rfc2549.org","username":"plaisthos"},"change_message_id":"f1242aa3057573b87e72992ca531eb976e7dfc5a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"                struct buffer cmdbuf \u003d alloc_buf_gc(buflen, \u0026gc);"},{"line_number":307,"context_line":"                buf_write(\u0026cmdbuf, BPTR(\u0026buf), buflen);"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":"                /* Remove \\r and \\n at the end of the buffer to avoid"},{"line_number":310,"context_line":"                 * problems with scripts and other that add extra \\r and \\n */"},{"line_number":311,"context_line":"                while (BLEN(\u0026cmdbuf)"},{"line_number":312,"context_line":"                       \u0026\u0026 (*(BEND(\u0026cmdbuf) - 2) \u003d\u003d \u0027\\r\u0027 || *(BEND(\u0026cmdbuf) - 2)\u003d\u003d \u0027\\n\u0027))"}],"source_content_type":"text/x-csrc","patch_set":1,"id":"ab73eb7e_71ef24b3","line":309,"in_reply_to":"f61c55e2_9b297160","updated":"2024-07-08 16:16:19.000000000","message":"I can. I missed that there is a buf_chomp. I looked for buf_trim buf_rtrim or similar.","commit_id":"48703d64a7234b7cf7a1319d404f9702a7a7a4e6"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"de828dfd46d56b68208fafe749f6ff67711b2a9c","unresolved":true,"context_lines":[{"line_number":299,"context_line":"            if (cmdlen \u003c BLEN(\u0026buf))"},{"line_number":300,"context_line":"            {"},{"line_number":301,"context_line":"                /* include the NUL byte and ensure NUL termination */"},{"line_number":302,"context_line":"                int buflen \u003d (int)strlen(BSTR(\u0026buf)) + 1;"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"                /* Construct a buffer that only holds the current command and"},{"line_number":305,"context_line":"                 * its closing NUL byte */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"fbe5364d_eb37f3f4","line":302,"updated":"2024-07-08 19:27:55.000000000","message":"While this is besser than the original, I find it still confusing to call `strlen()` twice on the very same string, in direct sequence.  What\u0027s wrong with `int buflen \u003d cmdlen +1;`...?","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"28148c3d6bdea4f22510c8a7158361b22d348457","unresolved":false,"context_lines":[{"line_number":299,"context_line":"            if (cmdlen \u003c BLEN(\u0026buf))"},{"line_number":300,"context_line":"            {"},{"line_number":301,"context_line":"                /* include the NUL byte and ensure NUL termination */"},{"line_number":302,"context_line":"                int buflen \u003d (int)strlen(BSTR(\u0026buf)) + 1;"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"                /* Construct a buffer that only holds the current command and"},{"line_number":305,"context_line":"                 * its closing NUL byte */"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"48fff3e1_39fedac0","line":302,"in_reply_to":"fbe5364d_eb37f3f4","updated":"2024-07-10 14:05:11.000000000","message":"Done","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2724e23a183254cfd96ab68845da9ff87536a66c","unresolved":true,"context_lines":[{"line_number":315,"context_line":"                if (!string_check_buf(\u0026cmdbuf, CC_PRINT | CC_NULL, CC_CRLF))"},{"line_number":316,"context_line":"                {"},{"line_number":317,"context_line":"                    msg(D_PUSH_ERRORS, \"WARNING: Received control with invalid characters: %s\","},{"line_number":318,"context_line":"                        format_hex(BPTR(\u0026buf), BLEN(\u0026cmdbuf), 256, \u0026gc));"},{"line_number":319,"context_line":"                }"},{"line_number":320,"context_line":"                else"},{"line_number":321,"context_line":"                {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"9a73fe6c_d79f0ee2","line":318,"updated":"2024-07-08 16:32:44.000000000","message":"While it is not actually wrong to use BPTR(\u0026buf) here, I would recommend BPTR(\u0026cmdbuf). It should make no difference to the output and looks less like an error.","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2fbf58744b4bb144f83214b82b8def9765720b17","unresolved":false,"context_lines":[{"line_number":315,"context_line":"                if (!string_check_buf(\u0026cmdbuf, CC_PRINT | CC_NULL, CC_CRLF))"},{"line_number":316,"context_line":"                {"},{"line_number":317,"context_line":"                    msg(D_PUSH_ERRORS, \"WARNING: Received control with invalid characters: %s\","},{"line_number":318,"context_line":"                        format_hex(BPTR(\u0026buf), BLEN(\u0026cmdbuf), 256, \u0026gc));"},{"line_number":319,"context_line":"                }"},{"line_number":320,"context_line":"                else"},{"line_number":321,"context_line":"                {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"5483cbeb_14179e53","line":318,"in_reply_to":"46ed5072_d7aeafa2","updated":"2024-07-09 16:13:27.000000000","message":"Done","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000002,"name":"cron2","display_name":"Gert Doering","email":"gert@greenie.muc.de","username":"cron2"},"change_message_id":"de828dfd46d56b68208fafe749f6ff67711b2a9c","unresolved":true,"context_lines":[{"line_number":315,"context_line":"                if (!string_check_buf(\u0026cmdbuf, CC_PRINT | CC_NULL, CC_CRLF))"},{"line_number":316,"context_line":"                {"},{"line_number":317,"context_line":"                    msg(D_PUSH_ERRORS, \"WARNING: Received control with invalid characters: %s\","},{"line_number":318,"context_line":"                        format_hex(BPTR(\u0026buf), BLEN(\u0026cmdbuf), 256, \u0026gc));"},{"line_number":319,"context_line":"                }"},{"line_number":320,"context_line":"                else"},{"line_number":321,"context_line":"                {"}],"source_content_type":"text/x-csrc","patch_set":2,"id":"46ed5072_d7aeafa2","line":318,"in_reply_to":"9a73fe6c_d79f0ee2","updated":"2024-07-08 19:27:55.000000000","message":"It is \"not wrong today\", but this sort of booby trap will come back and bite us later - so this should both be `\u0026cmdbuf` if that\u0027s the buffer we have looked at (especially with new code in the pipeline that might handle multiple commands in a single TLS record etc)","commit_id":"808fd564bc309430cdb4d071200d3d8791886340"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"2fbf58744b4bb144f83214b82b8def9765720b17","unresolved":true,"context_lines":[{"line_number":292,"context_line":"    {"},{"line_number":293,"context_line":"        while (BLEN(\u0026buf) \u003e 1)"},{"line_number":294,"context_line":"        {"},{"line_number":295,"context_line":"            struct buffer cmdbuf \u003d extract_command_buffer(buf, \u0026gc);"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if (cmdbuf.len \u003e 0)"},{"line_number":298,"context_line":"            {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"2df6966e_2cf72181","line":295,"updated":"2024-07-09 16:13:27.000000000","message":"\u0026buf","commit_id":"0531e80da3a82f95955dace00ae811768253d43b"},{"author":{"_account_id":1000001,"name":"flichtenheld","display_name":"Frank Lichtenheld","email":"frank@lichtenheld.com","username":"flichtenheld","status":"OpenVPN Inc."},"change_message_id":"28148c3d6bdea4f22510c8a7158361b22d348457","unresolved":false,"context_lines":[{"line_number":292,"context_line":"    {"},{"line_number":293,"context_line":"        while (BLEN(\u0026buf) \u003e 1)"},{"line_number":294,"context_line":"        {"},{"line_number":295,"context_line":"            struct buffer cmdbuf \u003d extract_command_buffer(buf, \u0026gc);"},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"            if (cmdbuf.len \u003e 0)"},{"line_number":298,"context_line":"            {"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"562bef0c_87a4f24d","line":295,"in_reply_to":"2df6966e_2cf72181","updated":"2024-07-10 14:05:11.000000000","message":"Done","commit_id":"0531e80da3a82f95955dace00ae811768253d43b"}]}
