{"action":"created","issue":{"url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/7","repository_url":"https://api.github.com/repos/yeokm1/SwiftSerial","labels_url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/7/comments","events_url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/7/events","html_url":"https://github.com/yeokm1/SwiftSerial/pull/7","id":358906430,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0NTI3MDU1","number":7,"title":"catch type conversion error and prevent infinite loop","user":{"login":"DasenB","id":14915246,"node_id":"MDQ6VXNlcjE0OTE1MjQ2","avatar_url":"https://avatars3.githubusercontent.com/u/14915246?v=4","gravatar_id":"","url":"https://api.github.com/users/DasenB","html_url":"https://github.com/DasenB","followers_url":"https://api.github.com/users/DasenB/followers","following_url":"https://api.github.com/users/DasenB/following{/other_user}","gists_url":"https://api.github.com/users/DasenB/gists{/gist_id}","starred_url":"https://api.github.com/users/DasenB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DasenB/subscriptions","organizations_url":"https://api.github.com/users/DasenB/orgs","repos_url":"https://api.github.com/users/DasenB/repos","events_url":"https://api.github.com/users/DasenB/events{/privacy}","received_events_url":"https://api.github.com/users/DasenB/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-09-11T06:39:22Z","updated_at":"2018-09-16T08:16:05Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/yeokm1/SwiftSerial/pulls/7","html_url":"https://github.com/yeokm1/SwiftSerial/pull/7","diff_url":"https://github.com/yeokm1/SwiftSerial/pull/7.diff","patch_url":"https://github.com/yeokm1/SwiftSerial/pull/7.patch"},"body":"Because CChar is a typealias for Int8 it only can handle values up to 127.\r\nWhen reading from the buffer and converting the value at buffer[0] to CChar it is possible that values larger than 127 occur.\r\nThis leads to crashes.\r\nTo prevent this I created PortError.unableToConvertByteToCharacter that is thrown for values larger than 127."},"comment":{"url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/comments/421721617","html_url":"https://github.com/yeokm1/SwiftSerial/pull/7#issuecomment-421721617","issue_url":"https://api.github.com/repos/yeokm1/SwiftSerial/issues/7","id":421721617,"node_id":"MDEyOklzc3VlQ29tbWVudDQyMTcyMTYxNw==","user":{"login":"yeokm1","id":1570592,"node_id":"MDQ6VXNlcjE1NzA1OTI=","avatar_url":"https://avatars1.githubusercontent.com/u/1570592?v=4","gravatar_id":"","url":"https://api.github.com/users/yeokm1","html_url":"https://github.com/yeokm1","followers_url":"https://api.github.com/users/yeokm1/followers","following_url":"https://api.github.com/users/yeokm1/following{/other_user}","gists_url":"https://api.github.com/users/yeokm1/gists{/gist_id}","starred_url":"https://api.github.com/users/yeokm1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yeokm1/subscriptions","organizations_url":"https://api.github.com/users/yeokm1/orgs","repos_url":"https://api.github.com/users/yeokm1/repos","events_url":"https://api.github.com/users/yeokm1/events{/privacy}","received_events_url":"https://api.github.com/users/yeokm1/received_events","type":"User","site_admin":false},"created_at":"2018-09-16T08:16:05Z","updated_at":"2018-09-16T08:16:05Z","author_association":"OWNER","body":"Is it possible that values higher that 127 will occur or have your encountered it? I thought I allocated the buffer with `UInt8` capacity which implies maximum 8 bits?\r\n\r\n`let buffer = UnsafeMutablePointer<UInt8>.allocate(capacity: 1)`\r\n\r\nI'm ok with your second portion on checking whether the file description is still valid.\r\n\r\n"}}
{"actor":{"display_login":"yeokm1"}}