{"action":"created","comment":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/47305253","id":47305253,"diff_hunk":"@@ -213,7 +213,7 @@ def read(key, name_ptr, *rtype)\n         when Win32::Registry::REG_MULTI_SZ\n           result = [ type, data_ptr.read_wide_string(string_length).split(/\\0/) ]\n         when Win32::Registry::REG_BINARY\n-          result = [ type, data.read_bytes(0, byte_length) ]\n+          result = [ type, data_ptr.read_bytes(0, byte_length) ]","path":"lib/puppet/util/windows/registry.rb","position":5,"original_position":5,"commit_id":"db4b50375c632adc4becae8356e066cba3265f53","original_commit_id":"db4b50375c632adc4becae8356e066cba3265f53","user":{"login":"Iristyle","id":394081,"avatar_url":"https://avatars.githubusercontent.com/u/394081?v=3","gravatar_id":"","url":"https://api.github.com/users/Iristyle","html_url":"https://github.com/Iristyle","followers_url":"https://api.github.com/users/Iristyle/followers","following_url":"https://api.github.com/users/Iristyle/following{/other_user}","gists_url":"https://api.github.com/users/Iristyle/gists{/gist_id}","starred_url":"https://api.github.com/users/Iristyle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Iristyle/subscriptions","organizations_url":"https://api.github.com/users/Iristyle/orgs","repos_url":"https://api.github.com/users/Iristyle/repos","events_url":"https://api.github.com/users/Iristyle/events{/privacy}","received_events_url":"https://api.github.com/users/Iristyle/received_events","type":"User","site_admin":false},"body":"I was able to get a hold of the data causing the problem.  The call needs to be changed to:\r\n\r\n```ruby\r\nresult = [ type, data_ptr.read_bytes(byte_length) ]\r\n```\r\n\r\nNote the lack of a `0` there.","created_at":"2015-12-10T23:58:51Z","updated_at":"2015-12-10T23:58:51Z","html_url":"https://github.com/puppetlabs/puppet/pull/4488#discussion_r47305253","pull_request_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488","_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments/47305253"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4488#discussion_r47305253"},"pull_request":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488"}}},"pull_request":{"url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488","id":53196119,"html_url":"https://github.com/puppetlabs/puppet/pull/4488","diff_url":"https://github.com/puppetlabs/puppet/pull/4488.diff","patch_url":"https://github.com/puppetlabs/puppet/pull/4488.patch","issue_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4488","number":4488,"state":"open","locked":false,"title":"{WIP}(PUP-5591) Fix registry binary read","user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"body":"Previously, the read method was using an older variable name when\r\nreading data for binary values. It would result in errors such as the\r\nfollowing when reading a binary value from the registry.\r\n\r\n~~~\r\nError: Could not run: undefined local variable or method `data' for\r\nPuppet::Provider::Package::Windows::Package:Class\r\nC:/Program Files/Puppet\r\nLabs/Puppet/puppet/lib/puppet/util/windows/registry.rb:216:in `block in\r\nread'\r\n~~~\r\n\r\nThis was introduced in b46ede74f640a809b68a473ac8720b93b13d2ac3 (Puppet\r\nv4.0.0).\r\n\r\nWithout this fix, any registry enumerations that contain a binary\r\nvalue will fail.","created_at":"2015-12-09T23:46:14Z","updated_at":"2015-12-10T23:58:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"53849bbc8558a5a1d9f96fd0e3e8131078b96d45","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488/commits","review_comments_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488/comments","review_comment_url":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/issues/4488/comments","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/db4b50375c632adc4becae8356e066cba3265f53","head":{"label":"ferventcoder:ticket/stable/PUP-5591-registry","ref":"ticket/stable/PUP-5591-registry","sha":"db4b50375c632adc4becae8356e066cba3265f53","user":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"repo":{"id":10981679,"name":"puppet","full_name":"ferventcoder/puppet","owner":{"login":"ferventcoder","id":63502,"avatar_url":"https://avatars.githubusercontent.com/u/63502?v=3","gravatar_id":"","url":"https://api.github.com/users/ferventcoder","html_url":"https://github.com/ferventcoder","followers_url":"https://api.github.com/users/ferventcoder/followers","following_url":"https://api.github.com/users/ferventcoder/following{/other_user}","gists_url":"https://api.github.com/users/ferventcoder/gists{/gist_id}","starred_url":"https://api.github.com/users/ferventcoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ferventcoder/subscriptions","organizations_url":"https://api.github.com/users/ferventcoder/orgs","repos_url":"https://api.github.com/users/ferventcoder/repos","events_url":"https://api.github.com/users/ferventcoder/events{/privacy}","received_events_url":"https://api.github.com/users/ferventcoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ferventcoder/puppet","description":"Server automation framework and application","fork":true,"url":"https://api.github.com/repos/ferventcoder/puppet","forks_url":"https://api.github.com/repos/ferventcoder/puppet/forks","keys_url":"https://api.github.com/repos/ferventcoder/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ferventcoder/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ferventcoder/puppet/teams","hooks_url":"https://api.github.com/repos/ferventcoder/puppet/hooks","issue_events_url":"https://api.github.com/repos/ferventcoder/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/ferventcoder/puppet/events","assignees_url":"https://api.github.com/repos/ferventcoder/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/ferventcoder/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/ferventcoder/puppet/tags","blobs_url":"https://api.github.com/repos/ferventcoder/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ferventcoder/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ferventcoder/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/ferventcoder/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ferventcoder/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/ferventcoder/puppet/languages","stargazers_url":"https://api.github.com/repos/ferventcoder/puppet/stargazers","contributors_url":"https://api.github.com/repos/ferventcoder/puppet/contributors","subscribers_url":"https://api.github.com/repos/ferventcoder/puppet/subscribers","subscription_url":"https://api.github.com/repos/ferventcoder/puppet/subscription","commits_url":"https://api.github.com/repos/ferventcoder/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/ferventcoder/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/ferventcoder/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/ferventcoder/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/ferventcoder/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/ferventcoder/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ferventcoder/puppet/merges","archive_url":"https://api.github.com/repos/ferventcoder/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ferventcoder/puppet/downloads","issues_url":"https://api.github.com/repos/ferventcoder/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/ferventcoder/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/ferventcoder/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/ferventcoder/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ferventcoder/puppet/labels{/name}","releases_url":"https://api.github.com/repos/ferventcoder/puppet/releases{/id}","created_at":"2013-06-26T23:11:03Z","updated_at":"2015-04-28T19:14:11Z","pushed_at":"2015-12-09T23:45:21Z","git_url":"git://github.com/ferventcoder/puppet.git","ssh_url":"git@github.com:ferventcoder/puppet.git","clone_url":"https://github.com/ferventcoder/puppet.git","svn_url":"https://github.com/ferventcoder/puppet","homepage":"http://www.puppetlabs.com/puppet/introduction/","size":49122,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"puppetlabs:stable","ref":"stable","sha":"c1cabcc3f2bf4e8589ae58f0e7467185d5930c28","user":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":910744,"name":"puppet","full_name":"puppetlabs/puppet","owner":{"login":"puppetlabs","id":234268,"avatar_url":"https://avatars.githubusercontent.com/u/234268?v=3","gravatar_id":"","url":"https://api.github.com/users/puppetlabs","html_url":"https://github.com/puppetlabs","followers_url":"https://api.github.com/users/puppetlabs/followers","following_url":"https://api.github.com/users/puppetlabs/following{/other_user}","gists_url":"https://api.github.com/users/puppetlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/puppetlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/puppetlabs/subscriptions","organizations_url":"https://api.github.com/users/puppetlabs/orgs","repos_url":"https://api.github.com/users/puppetlabs/repos","events_url":"https://api.github.com/users/puppetlabs/events{/privacy}","received_events_url":"https://api.github.com/users/puppetlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/puppetlabs/puppet","description":"Server automation framework and application","fork":false,"url":"https://api.github.com/repos/puppetlabs/puppet","forks_url":"https://api.github.com/repos/puppetlabs/puppet/forks","keys_url":"https://api.github.com/repos/puppetlabs/puppet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/puppetlabs/puppet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/puppetlabs/puppet/teams","hooks_url":"https://api.github.com/repos/puppetlabs/puppet/hooks","issue_events_url":"https://api.github.com/repos/puppetlabs/puppet/issues/events{/number}","events_url":"https://api.github.com/repos/puppetlabs/puppet/events","assignees_url":"https://api.github.com/repos/puppetlabs/puppet/assignees{/user}","branches_url":"https://api.github.com/repos/puppetlabs/puppet/branches{/branch}","tags_url":"https://api.github.com/repos/puppetlabs/puppet/tags","blobs_url":"https://api.github.com/repos/puppetlabs/puppet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/puppetlabs/puppet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/puppetlabs/puppet/git/refs{/sha}","trees_url":"https://api.github.com/repos/puppetlabs/puppet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/puppetlabs/puppet/statuses/{sha}","languages_url":"https://api.github.com/repos/puppetlabs/puppet/languages","stargazers_url":"https://api.github.com/repos/puppetlabs/puppet/stargazers","contributors_url":"https://api.github.com/repos/puppetlabs/puppet/contributors","subscribers_url":"https://api.github.com/repos/puppetlabs/puppet/subscribers","subscription_url":"https://api.github.com/repos/puppetlabs/puppet/subscription","commits_url":"https://api.github.com/repos/puppetlabs/puppet/commits{/sha}","git_commits_url":"https://api.github.com/repos/puppetlabs/puppet/git/commits{/sha}","comments_url":"https://api.github.com/repos/puppetlabs/puppet/comments{/number}","issue_comment_url":"https://api.github.com/repos/puppetlabs/puppet/issues/comments{/number}","contents_url":"https://api.github.com/repos/puppetlabs/puppet/contents/{+path}","compare_url":"https://api.github.com/repos/puppetlabs/puppet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/puppetlabs/puppet/merges","archive_url":"https://api.github.com/repos/puppetlabs/puppet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/puppetlabs/puppet/downloads","issues_url":"https://api.github.com/repos/puppetlabs/puppet/issues{/number}","pulls_url":"https://api.github.com/repos/puppetlabs/puppet/pulls{/number}","milestones_url":"https://api.github.com/repos/puppetlabs/puppet/milestones{/number}","notifications_url":"https://api.github.com/repos/puppetlabs/puppet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/puppetlabs/puppet/labels{/name}","releases_url":"https://api.github.com/repos/puppetlabs/puppet/releases{/id}","created_at":"2010-09-14T19:26:44Z","updated_at":"2015-12-10T18:45:19Z","pushed_at":"2015-12-10T20:30:42Z","git_url":"git://github.com/puppetlabs/puppet.git","ssh_url":"git@github.com:puppetlabs/puppet.git","clone_url":"https://github.com/puppetlabs/puppet.git","svn_url":"https://github.com/puppetlabs/puppet","homepage":"https://puppetlabs.com/puppet/what-is-puppet","size":77087,"stargazers_count":3687,"watchers_count":3687,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1539,"mirror_url":null,"open_issues_count":34,"forks":1539,"open_issues":34,"watchers":3687,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488"},"html":{"href":"https://github.com/puppetlabs/puppet/pull/4488"},"issue":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4488"},"comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/issues/4488/comments"},"review_comments":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488/comments"},"review_comment":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/puppetlabs/puppet/pulls/4488/commits"},"statuses":{"href":"https://api.github.com/repos/puppetlabs/puppet/statuses/db4b50375c632adc4becae8356e066cba3265f53"}}}}