{"action":"created","issue":{"url":"https://api.github.com/repos/ellzey/libevhtp/issues/215","repository_url":"https://api.github.com/repos/ellzey/libevhtp","labels_url":"https://api.github.com/repos/ellzey/libevhtp/issues/215/labels{/name}","comments_url":"https://api.github.com/repos/ellzey/libevhtp/issues/215/comments","events_url":"https://api.github.com/repos/ellzey/libevhtp/issues/215/events","html_url":"https://github.com/ellzey/libevhtp/issues/215","id":152030118,"number":215,"title":"Segmentation Fault in func evhtp_parse_query_wflags when query is large","user":{"login":"niuox","id":5229621,"avatar_url":"https://avatars.githubusercontent.com/u/5229621?v=3","gravatar_id":"","url":"https://api.github.com/users/niuox","html_url":"https://github.com/niuox","followers_url":"https://api.github.com/users/niuox/followers","following_url":"https://api.github.com/users/niuox/following{/other_user}","gists_url":"https://api.github.com/users/niuox/gists{/gist_id}","starred_url":"https://api.github.com/users/niuox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niuox/subscriptions","organizations_url":"https://api.github.com/users/niuox/orgs","repos_url":"https://api.github.com/users/niuox/repos","events_url":"https://api.github.com/users/niuox/events{/privacy}","received_events_url":"https://api.github.com/users/niuox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-04-30T13:23:55Z","updated_at":"2016-07-19T19:12:56Z","closed_at":null,"body":"When the size of query is very large, function evhtp_parse_query_wflags in evhtp.c will break down because of the local inner space is larger than maximum stack size. \r\n    \r\n    #ifdef EVHTP_HAS_C99\r\n        char   key_buf[len + 1];\r\n        char   val_buf[len + 1];\r\n    #else\r\n\r\nTake it into a consideration to judge whether 2*len < maximum stack size before assigning key_buf and val_buf?\r\n\r\n    struct  rlimit rl;\r\n    int result;\r\n    result = getrlimit(RLIMIT_STACK, &rl);\r\n    if (result == 0){\r\n        if (2*len < rl.rlim_cur){\r\n            char key_buf[len+1];\r\n            char val_buf[len+1];\r\n        }else{\r\n              //malloc ... just like what not def EVHTP_HAS_C99 was doing\r\n        }\r\n    }\r\n"},"comment":{"url":"https://api.github.com/repos/ellzey/libevhtp/issues/comments/233735751","html_url":"https://github.com/ellzey/libevhtp/issues/215#issuecomment-233735751","issue_url":"https://api.github.com/repos/ellzey/libevhtp/issues/215","id":233735751,"user":{"login":"ytrezq","id":3824869,"avatar_url":"https://avatars.githubusercontent.com/u/3824869?v=3","gravatar_id":"","url":"https://api.github.com/users/ytrezq","html_url":"https://github.com/ytrezq","followers_url":"https://api.github.com/users/ytrezq/followers","following_url":"https://api.github.com/users/ytrezq/following{/other_user}","gists_url":"https://api.github.com/users/ytrezq/gists{/gist_id}","starred_url":"https://api.github.com/users/ytrezq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ytrezq/subscriptions","organizations_url":"https://api.github.com/users/ytrezq/orgs","repos_url":"https://api.github.com/users/ytrezq/repos","events_url":"https://api.github.com/users/ytrezq/events{/privacy}","received_events_url":"https://api.github.com/users/ytrezq/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T19:12:56Z","updated_at":"2016-07-19T19:12:56Z","body":"@ellzey : Ok I create a pull "}}
{"actor":{"display_login":"ytrezq"}}