{"action":"closed","issue":{"url":"https://api.github.com/repos/nothings/stb/issues/254","repository_url":"https://api.github.com/repos/nothings/stb","labels_url":"https://api.github.com/repos/nothings/stb/issues/254/labels{/name}","comments_url":"https://api.github.com/repos/nothings/stb/issues/254/comments","events_url":"https://api.github.com/repos/nothings/stb/issues/254/events","html_url":"https://github.com/nothings/stb/issues/254","id":138619771,"number":254,"title":"stbi__zbuild_huffman() overflow/dead code","user":{"login":"technosaurus","id":1270569,"avatar_url":"https://avatars.githubusercontent.com/u/1270569?v=3","gravatar_id":"","url":"https://api.github.com/users/technosaurus","html_url":"https://github.com/technosaurus","followers_url":"https://api.github.com/users/technosaurus/followers","following_url":"https://api.github.com/users/technosaurus/following{/other_user}","gists_url":"https://api.github.com/users/technosaurus/gists{/gist_id}","starred_url":"https://api.github.com/users/technosaurus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/technosaurus/subscriptions","organizations_url":"https://api.github.com/users/technosaurus/orgs","repos_url":"https://api.github.com/users/technosaurus/repos","events_url":"https://api.github.com/users/technosaurus/events{/privacy}","received_events_url":"https://api.github.com/users/technosaurus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-04T23:48:34Z","updated_at":"2016-03-05T05:10:52Z","closed_at":"2016-03-05T05:10:52Z","body":"\r\nWhat is  `++sizes[sizelist[i]];` supposed to do?\r\n```\r\nstatic int stbi__zbuild_huffman(stbi__zhuffman *z, stbi_uc *sizelist, int num){\r\n   int i,k=0;\r\n   int code, next_code[16], sizes[17];\r\n   memset(sizes, 0, sizeof(sizes));\r\n   memset(z->fast, 0, sizeof(z->fast));\r\n   for (i=0; i < num; ++i)\r\n      ++sizes[sizelist[i]];\r\n   sizes[0] = 0;\r\n   for (i=1; i < 16; ++i)\r\n      if (sizes[i] > (1 << i))\r\n         return stbi__err(\"bad sizes\", \"Corrupt PNG\");\r\n//...\r\n```"}}