{"action":"opened","issue":{"url":"https://api.github.com/repos/coderforlife/ms-compress/issues/28","labels_url":"https://api.github.com/repos/coderforlife/ms-compress/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/coderforlife/ms-compress/issues/28/comments","events_url":"https://api.github.com/repos/coderforlife/ms-compress/issues/28/events","html_url":"https://github.com/coderforlife/ms-compress/issues/28","id":127202017,"number":28,"title":"Decompression crashes under mingw-w64","user":{"login":"jibsen","id":1367512,"avatar_url":"https://avatars.githubusercontent.com/u/1367512?v=3","gravatar_id":"","url":"https://api.github.com/users/jibsen","html_url":"https://github.com/jibsen","followers_url":"https://api.github.com/users/jibsen/followers","following_url":"https://api.github.com/users/jibsen/following{/other_user}","gists_url":"https://api.github.com/users/jibsen/gists{/gist_id}","starred_url":"https://api.github.com/users/jibsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jibsen/subscriptions","organizations_url":"https://api.github.com/users/jibsen/orgs","repos_url":"https://api.github.com/users/jibsen/repos","events_url":"https://api.github.com/users/jibsen/events{/privacy}","received_events_url":"https://api.github.com/users/jibsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-18T10:55:58Z","updated_at":"2016-01-18T10:55:58Z","closed_at":null,"body":"I am seeing some crashes in xpress-huffman when running the new squash decompression test compiled with mingw-w64 on Windows.\r\n\r\nSpecifically, it is the memset on [line 67](https://github.com/coderforlife/ms-compress/blob/master/include/mscomp/HuffmanDecoder.h#L67) in HuffmanDecoder.h. I've tracked it down to an overflow in the computation of `last` a few lines above, resulting in a state where `index > limit`.\r\n\r\nThe code works with MSVC, because it happens to use 32-bit values for `uint_fast16_t`, but fails with GCC which uses 16-bit values."}}