{"action":"created","issue":{"url":"https://api.github.com/repos/bakpakin/binser/issues/14","repository_url":"https://api.github.com/repos/bakpakin/binser","labels_url":"https://api.github.com/repos/bakpakin/binser/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/bakpakin/binser/issues/14/comments","events_url":"https://api.github.com/repos/bakpakin/binser/issues/14/events","html_url":"https://github.com/bakpakin/binser/issues/14","id":364088310,"node_id":"MDU6SXNzdWUzNjQwODgzMTA=","number":14,"title":"Error on malformed input when looking ahead ","user":{"login":"mpeterv","id":6032370,"node_id":"MDQ6VXNlcjYwMzIzNzA=","avatar_url":"https://avatars1.githubusercontent.com/u/6032370?v=4","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-09-26T15:26:55Z","updated_at":"2018-09-28T19:50:49Z","closed_at":null,"author_association":"NONE","body":"binser sometimes optimistically works with bytes at indexes that may be past end of input. E.g.\r\n\r\n```lua\r\nlocal binser = require \"binser\"\r\nbinser.deserialize(\"\\128\")\r\n```\r\n```\r\nbinser.lua:347: attempt to perform arithmetic on a nil value\r\nstack traceback:\r\n\tbinser.lua:347: in upvalue 'deserialize_value'\r\n\tbinser.lua:455: in function 'binser.deserialize'\r\n\t(...tail calls...)\r\n\t[C]: in ?\r\n```\r\n(this is on fix-next branch)\r\n\r\nThis technically fits the \"binser throws on malformed input\" contract but makes it impossible to distinguish deseriazation failures due to bad input from regular Lua errors (bugs happen, don't want to silence/misinterpret them). It would be even nicer if there was a way to get nil + error message on malformed input."},"comment":{"url":"https://api.github.com/repos/bakpakin/binser/issues/comments/425547055","html_url":"https://github.com/bakpakin/binser/issues/14#issuecomment-425547055","issue_url":"https://api.github.com/repos/bakpakin/binser/issues/14","id":425547055,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTU0NzA1NQ==","user":{"login":"mpeterv","id":6032370,"node_id":"MDQ6VXNlcjYwMzIzNzA=","avatar_url":"https://avatars1.githubusercontent.com/u/6032370?v=4","gravatar_id":"","url":"https://api.github.com/users/mpeterv","html_url":"https://github.com/mpeterv","followers_url":"https://api.github.com/users/mpeterv/followers","following_url":"https://api.github.com/users/mpeterv/following{/other_user}","gists_url":"https://api.github.com/users/mpeterv/gists{/gist_id}","starred_url":"https://api.github.com/users/mpeterv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mpeterv/subscriptions","organizations_url":"https://api.github.com/users/mpeterv/orgs","repos_url":"https://api.github.com/users/mpeterv/repos","events_url":"https://api.github.com/users/mpeterv/events{/privacy}","received_events_url":"https://api.github.com/users/mpeterv/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T19:50:49Z","updated_at":"2018-09-28T19:50:49Z","author_association":"NONE","body":"Also luacheck is angry at global `newindex` on line 385"}}
{"actor":{"display_login":"mpeterv"}}