{"action":"created","issue":{"url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/127","repository_url":"https://api.github.com/repos/haskell-crypto/cryptonite","labels_url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/127/comments","events_url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/127/events","html_url":"https://github.com/haskell-crypto/cryptonite/issues/127","id":198190183,"number":127,"title":"Unexpected results with Crypto.Random","user":{"login":"centromere","id":543423,"avatar_url":"https://avatars.githubusercontent.com/u/543423?v=3","gravatar_id":"","url":"https://api.github.com/users/centromere","html_url":"https://github.com/centromere","followers_url":"https://api.github.com/users/centromere/followers","following_url":"https://api.github.com/users/centromere/following{/other_user}","gists_url":"https://api.github.com/users/centromere/gists{/gist_id}","starred_url":"https://api.github.com/users/centromere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/centromere/subscriptions","organizations_url":"https://api.github.com/users/centromere/orgs","repos_url":"https://api.github.com/users/centromere/repos","events_url":"https://api.github.com/users/centromere/events{/privacy}","received_events_url":"https://api.github.com/users/centromere/received_events","type":"User","site_admin":false},"labels":[{"id":111605464,"url":"https://api.github.com/repos/haskell-crypto/cryptonite/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-12-30T20:16:40Z","updated_at":"2016-12-31T11:43:39Z","closed_at":null,"body":"I ran the following program:\r\n\r\n```haskell\r\nmodule Main where\r\n\r\nimport Crypto.Random\r\nimport Data.ByteArray\r\n\r\nmain :: IO ()\r\nmain = do\r\n  gen <- drgNew\r\n  let (bytes, _) = randomBytesGenerate 1024 gen \r\n  print (bytes :: Bytes)\r\n```\r\n\r\nI copied the output directly in to ghci:\r\n\r\n```\r\nλ> let x = \"...\" :: String\r\nλ> length x\r\n8704\r\n```\r\n\r\nI would have expected a length of 1024.\r\nMoreover, the output contains huge swaths of `\\NUL`, leading me to believe that inappropriate areas of memory are being accessed."},"comment":{"url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/comments/269861447","html_url":"https://github.com/haskell-crypto/cryptonite/issues/127#issuecomment-269861447","issue_url":"https://api.github.com/repos/haskell-crypto/cryptonite/issues/127","id":269861447,"user":{"login":"ocheron","id":2415051,"avatar_url":"https://avatars.githubusercontent.com/u/2415051?v=3","gravatar_id":"","url":"https://api.github.com/users/ocheron","html_url":"https://github.com/ocheron","followers_url":"https://api.github.com/users/ocheron/followers","following_url":"https://api.github.com/users/ocheron/following{/other_user}","gists_url":"https://api.github.com/users/ocheron/gists{/gist_id}","starred_url":"https://api.github.com/users/ocheron/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocheron/subscriptions","organizations_url":"https://api.github.com/users/ocheron/orgs","repos_url":"https://api.github.com/users/ocheron/repos","events_url":"https://api.github.com/users/ocheron/events{/privacy}","received_events_url":"https://api.github.com/users/ocheron/received_events","type":"User","site_admin":false},"created_at":"2016-12-31T11:43:39Z","updated_at":"2016-12-31T11:43:39Z","body":"PR created: vincenthz/hs-memory#27."}}
{"actor":{"display_login":"ocheron"}}