{"action":"created","issue":{"url":"https://api.github.com/repos/zint/zint/issues/48","labels_url":"https://api.github.com/repos/zint/zint/issues/48/labels{/name}","comments_url":"https://api.github.com/repos/zint/zint/issues/48/comments","events_url":"https://api.github.com/repos/zint/zint/issues/48/events","html_url":"https://github.com/zint/zint/issues/48","id":104639834,"number":48,"title":"Plessey Check : unsigned iterator never negative","user":{"login":"arnejpackz","id":12431386,"avatar_url":"https://avatars.githubusercontent.com/u/12431386?v=3","gravatar_id":"","url":"https://api.github.com/users/arnejpackz","html_url":"https://github.com/arnejpackz","followers_url":"https://api.github.com/users/arnejpackz/followers","following_url":"https://api.github.com/users/arnejpackz/following{/other_user}","gists_url":"https://api.github.com/users/arnejpackz/gists{/gist_id}","starred_url":"https://api.github.com/users/arnejpackz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arnejpackz/subscriptions","organizations_url":"https://api.github.com/users/arnejpackz/orgs","repos_url":"https://api.github.com/users/arnejpackz/repos","events_url":"https://api.github.com/users/arnejpackz/events{/privacy}","received_events_url":"https://api.github.com/users/arnejpackz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-03T07:45:05Z","updated_at":"2015-09-03T20:57:32Z","closed_at":null,"body":"You can find this code twice in plessey.c:\r\n\r\nfor(i = src_len - 1; i >= 0; i--) {\r\n\t\tx += weight * ctoi(source[i]);\r\n\r\nThe problem is that i was declared unsigned, so this is an infinite loop (until the point of memory corruption). The easiest fix is to modify to\r\n\r\nfor(i = src_len; i; i--) {\r\n\t\tx += weight * ctoi(source[ i - 1 ]);\r\n"},"comment":{"url":"https://api.github.com/repos/zint/zint/issues/comments/137573108","html_url":"https://github.com/zint/zint/issues/48#issuecomment-137573108","issue_url":"https://api.github.com/repos/zint/zint/issues/48","id":137573108,"user":{"login":"oehhar","id":12413997,"avatar_url":"https://avatars.githubusercontent.com/u/12413997?v=3","gravatar_id":"","url":"https://api.github.com/users/oehhar","html_url":"https://github.com/oehhar","followers_url":"https://api.github.com/users/oehhar/followers","following_url":"https://api.github.com/users/oehhar/following{/other_user}","gists_url":"https://api.github.com/users/oehhar/gists{/gist_id}","starred_url":"https://api.github.com/users/oehhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oehhar/subscriptions","organizations_url":"https://api.github.com/users/oehhar/orgs","repos_url":"https://api.github.com/users/oehhar/repos","events_url":"https://api.github.com/users/oehhar/events{/privacy}","received_events_url":"https://api.github.com/users/oehhar/received_events","type":"User","site_admin":false},"created_at":"2015-09-03T20:57:32Z","updated_at":"2015-09-03T20:57:32Z","body":"Sorry on business trip.\nBut if I remember right this was corrected.\nCould you verify if this is still in the current trunk on sourceforge.net ?\n\nThank you,\nHarald\n\nAm 03.09.2015 um 09:45 schrieb arnejpackz:\n> You can find this code twicein plessey.c:\n> \n> for(i = src_len - 1; i >= 0; i--) {\n> \t\tx += weight * ctoi(source[i]);\n> \n> The problem is that i was declared unsigned, so this is an infinite loop (until the point of memory corruption). The easiest fix is to modify to\n> \n> for(i = src_len; i; i--) {\n> \t\tx += weight * ctoi(source[ i - 1 ]);\n> \n"}}