{"action":"created","issue":{"url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/28","repository_url":"https://api.github.com/repos/orangeduck/LuaAutoC","labels_url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/28/comments","events_url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/28/events","html_url":"https://github.com/orangeduck/LuaAutoC/issues/28","id":322724309,"number":28,"title":"luaA_call_entry() does not validate the number of arguments","user":{"login":"fredrikdanielmoller","id":34436531,"avatar_url":"https://avatars3.githubusercontent.com/u/34436531?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikdanielmoller","html_url":"https://github.com/fredrikdanielmoller","followers_url":"https://api.github.com/users/fredrikdanielmoller/followers","following_url":"https://api.github.com/users/fredrikdanielmoller/following{/other_user}","gists_url":"https://api.github.com/users/fredrikdanielmoller/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikdanielmoller/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikdanielmoller/subscriptions","organizations_url":"https://api.github.com/users/fredrikdanielmoller/orgs","repos_url":"https://api.github.com/users/fredrikdanielmoller/repos","events_url":"https://api.github.com/users/fredrikdanielmoller/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikdanielmoller/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-05-14T08:48:41Z","updated_at":"2018-05-21T14:10:50Z","closed_at":"2018-05-21T14:10:50Z","author_association":"NONE","body":"luaA_call_entry() does not check that it is called with the correct number of arguments.\r\nExpected behaviour is for exception to be raised if it is called with wrong number of arguments.\r\n\r\nExample C code:\r\n```\r\nint add_3_integers(int a, int b, int c) {\r\n  return a+b+c;\r\n}\r\nluaA_function(L, add_3_integers, int, int, int, int);\r\n```\r\n\r\nCalling this with only one argument from Lua leads to a crash in index2addr() line 69:\r\n`api_check(L, idx != 0 && -idx <= L->top - (ci->func + 1), \"invalid index\");`\r\n\r\nCall stack:\r\n```\r\nindex2addr() at lapi.c:69 0x801ec48\t\r\nlua_tointegerx() at lapi.c:358 0x801f4c6\t\r\nluaA_to_int() at lautoc.c:319 0x802220a\t\r\nluaA_to_type() at lautoc.c:218 0x8021f04\t\r\nluaA_call_entry() at lautoc.c:1 198 0x8022f34\t\r\nluaA_call_name() at lautoc.c:1 259 0x802309e\t\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/comments/390665132","html_url":"https://github.com/orangeduck/LuaAutoC/issues/28#issuecomment-390665132","issue_url":"https://api.github.com/repos/orangeduck/LuaAutoC/issues/28","id":390665132,"user":{"login":"orangeduck","id":177299,"avatar_url":"https://avatars1.githubusercontent.com/u/177299?v=4","gravatar_id":"","url":"https://api.github.com/users/orangeduck","html_url":"https://github.com/orangeduck","followers_url":"https://api.github.com/users/orangeduck/followers","following_url":"https://api.github.com/users/orangeduck/following{/other_user}","gists_url":"https://api.github.com/users/orangeduck/gists{/gist_id}","starred_url":"https://api.github.com/users/orangeduck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/orangeduck/subscriptions","organizations_url":"https://api.github.com/users/orangeduck/orgs","repos_url":"https://api.github.com/users/orangeduck/repos","events_url":"https://api.github.com/users/orangeduck/events{/privacy}","received_events_url":"https://api.github.com/users/orangeduck/received_events","type":"User","site_admin":false},"created_at":"2018-05-21T14:10:50Z","updated_at":"2018-05-21T14:10:50Z","author_association":"OWNER","body":"Great, thanks!"}}
{"actor":{"display_login":"orangeduck"}}