{"action":"created","issue":{"url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/44","labels_url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/44/labels{/name}","comments_url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/44/comments","events_url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/44/events","html_url":"https://github.com/dwrensha/capnproto-rust/pull/44","id":83129334,"number":44,"title":"OutputCollector allows get_segments_for_output() to take immutable self.","user":{"login":"dwrensha","id":495768,"avatar_url":"https://avatars.githubusercontent.com/u/495768?v=3","gravatar_id":"","url":"https://api.github.com/users/dwrensha","html_url":"https://github.com/dwrensha","followers_url":"https://api.github.com/users/dwrensha/followers","following_url":"https://api.github.com/users/dwrensha/following{/other_user}","gists_url":"https://api.github.com/users/dwrensha/gists{/gist_id}","starred_url":"https://api.github.com/users/dwrensha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwrensha/subscriptions","organizations_url":"https://api.github.com/users/dwrensha/orgs","repos_url":"https://api.github.com/users/dwrensha/repos","events_url":"https://api.github.com/users/dwrensha/events{/privacy}","received_events_url":"https://api.github.com/users/dwrensha/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-05-31T16:33:15Z","updated_at":"2015-05-31T17:38:47Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/dwrensha/capnproto-rust/pulls/44","html_url":"https://github.com/dwrensha/capnproto-rust/pull/44","diff_url":"https://github.com/dwrensha/capnproto-rust/pull/44.diff","patch_url":"https://github.com/dwrensha/capnproto-rust/pull/44.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/comments/107226559","html_url":"https://github.com/dwrensha/capnproto-rust/pull/44#issuecomment-107226559","issue_url":"https://api.github.com/repos/dwrensha/capnproto-rust/issues/44","id":107226559,"user":{"login":"danburkert","id":160242,"avatar_url":"https://avatars.githubusercontent.com/u/160242?v=3","gravatar_id":"","url":"https://api.github.com/users/danburkert","html_url":"https://github.com/danburkert","followers_url":"https://api.github.com/users/danburkert/followers","following_url":"https://api.github.com/users/danburkert/following{/other_user}","gists_url":"https://api.github.com/users/danburkert/gists{/gist_id}","starred_url":"https://api.github.com/users/danburkert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danburkert/subscriptions","organizations_url":"https://api.github.com/users/danburkert/orgs","repos_url":"https://api.github.com/users/danburkert/repos","events_url":"https://api.github.com/users/danburkert/events{/privacy}","received_events_url":"https://api.github.com/users/danburkert/received_events","type":"User","site_admin":false},"created_at":"2015-05-31T17:38:47Z","updated_at":"2015-05-31T17:38:47Z","body":"I haven't compiled this example, but I think this allows a use after free:\r\n\r\n```rust\r\nlet mut message = MallocMessageBuilder::new_default();\r\nlet mut collector = OutputCollector::new();\r\n\r\nmessage.get_segments_for_output(&mut collector);\r\ndrop(message);\r\ncollector.get()\r\n```"}}