{"action":"created","comment":{"url":"https://api.github.com/repos/ayende/ravendb/pulls/comments/66244518","id":66244518,"diff_hunk":"@@ -483,5 +485,180 @@ public void CopyTo(byte* ptr)\n             Memory.Copy(ptr, _mem, _size);\n         }\n \n+        public void BlittableValidation(int size)\n+        {\n+            byte offset;\n+            var currentSize = size - 1;\n+            int rootPropOffsetSize;\n+            int rootPropIdSize;\n+\n+            var rootToken = TokenValidation(*(_mem + currentSize), out rootPropOffsetSize, out rootPropIdSize);\n+            if (rootToken != BlittableJsonToken.StartObject)\n+                throw new InvalidDataException(\"Illegal root object\");\n+            currentSize--;\n+\n+            var propsOffsetList = ReadVariableSizeIntInReverse(_mem, currentSize, out offset);\n+            currentSize -= offset;\n+\n+            var rootMetadataOffset = ReadVariableSizeIntInReverse(_mem, currentSize, out offset);\n+            currentSize -= offset;\n+\n+            if ((propsOffsetList > currentSize) || (propsOffsetList <= 0))\n+                throw new InvalidDataException(\"Properties names offset not valid\");\n+\n+            int propNamesOffsetSize;\n+            var token = (BlittableJsonToken)(*(_mem + propsOffsetList));\n+            propNamesOffsetSize = ProcessTokenOffsetFlags(token);\n+            if (((token & (BlittableJsonToken)0xC0) != 0) || ((TypesMask & token) != 0x00))","path":"src/Sparrow/Json/BlittableJsonReaderObject.cs","position":44,"original_position":44,"commit_id":"9fe48fa01ac10a30fb0a39973a2c4a2eb775e779","original_commit_id":"9fe48fa01ac10a30fb0a39973a2c4a2eb775e779","user":{"login":"ayende","id":116915,"avatar_url":"https://avatars.githubusercontent.com/u/116915?v=3","gravatar_id":"","url":"https://api.github.com/users/ayende","html_url":"https://github.com/ayende","followers_url":"https://api.github.com/users/ayende/followers","following_url":"https://api.github.com/users/ayende/following{/other_user}","gists_url":"https://api.github.com/users/ayende/gists{/gist_id}","starred_url":"https://api.github.com/users/ayende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayende/subscriptions","organizations_url":"https://api.github.com/users/ayende/orgs","repos_url":"https://api.github.com/users/ayende/repos","events_url":"https://api.github.com/users/ayende/events{/privacy}","received_events_url":"https://api.github.com/users/ayende/received_events","type":"User","site_admin":false},"body":"What is 0xC0 ? Not clear from the context of the code","created_at":"2016-06-08T12:21:57Z","updated_at":"2016-06-08T12:21:57Z","html_url":"https://github.com/ayende/ravendb/pull/3819#discussion_r66244518","pull_request_url":"https://api.github.com/repos/ayende/ravendb/pulls/3819","_links":{"self":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/comments/66244518"},"html":{"href":"https://github.com/ayende/ravendb/pull/3819#discussion_r66244518"},"pull_request":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/3819"}}},"pull_request":{"url":"https://api.github.com/repos/ayende/ravendb/pulls/3819","id":73022806,"html_url":"https://github.com/ayende/ravendb/pull/3819","diff_url":"https://github.com/ayende/ravendb/pull/3819.diff","patch_url":"https://github.com/ayende/ravendb/pull/3819.patch","issue_url":"https://api.github.com/repos/ayende/ravendb/issues/3819","number":3819,"state":"open","locked":false,"title":"RavenDB-4280 Security validation for the blittable format","user":{"login":"efratshenhar","id":18046191,"avatar_url":"https://avatars.githubusercontent.com/u/18046191?v=3","gravatar_id":"","url":"https://api.github.com/users/efratshenhar","html_url":"https://github.com/efratshenhar","followers_url":"https://api.github.com/users/efratshenhar/followers","following_url":"https://api.github.com/users/efratshenhar/following{/other_user}","gists_url":"https://api.github.com/users/efratshenhar/gists{/gist_id}","starred_url":"https://api.github.com/users/efratshenhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efratshenhar/subscriptions","organizations_url":"https://api.github.com/users/efratshenhar/orgs","repos_url":"https://api.github.com/users/efratshenhar/repos","events_url":"https://api.github.com/users/efratshenhar/events{/privacy}","received_events_url":"https://api.github.com/users/efratshenhar/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-06-08T10:32:19Z","updated_at":"2016-06-08T12:21:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b31e635f07cf667e4c951df28811205de7db90b5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ayende/ravendb/pulls/3819/commits","review_comments_url":"https://api.github.com/repos/ayende/ravendb/pulls/3819/comments","review_comment_url":"https://api.github.com/repos/ayende/ravendb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ayende/ravendb/issues/3819/comments","statuses_url":"https://api.github.com/repos/ayende/ravendb/statuses/9fe48fa01ac10a30fb0a39973a2c4a2eb775e779","head":{"label":"efratshenhar:v4.0_RavenDB-4280","ref":"v4.0_RavenDB-4280","sha":"9fe48fa01ac10a30fb0a39973a2c4a2eb775e779","user":{"login":"efratshenhar","id":18046191,"avatar_url":"https://avatars.githubusercontent.com/u/18046191?v=3","gravatar_id":"","url":"https://api.github.com/users/efratshenhar","html_url":"https://github.com/efratshenhar","followers_url":"https://api.github.com/users/efratshenhar/followers","following_url":"https://api.github.com/users/efratshenhar/following{/other_user}","gists_url":"https://api.github.com/users/efratshenhar/gists{/gist_id}","starred_url":"https://api.github.com/users/efratshenhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efratshenhar/subscriptions","organizations_url":"https://api.github.com/users/efratshenhar/orgs","repos_url":"https://api.github.com/users/efratshenhar/repos","events_url":"https://api.github.com/users/efratshenhar/events{/privacy}","received_events_url":"https://api.github.com/users/efratshenhar/received_events","type":"User","site_admin":false},"repo":{"id":54645102,"name":"ravendb","full_name":"efratshenhar/ravendb","owner":{"login":"efratshenhar","id":18046191,"avatar_url":"https://avatars.githubusercontent.com/u/18046191?v=3","gravatar_id":"","url":"https://api.github.com/users/efratshenhar","html_url":"https://github.com/efratshenhar","followers_url":"https://api.github.com/users/efratshenhar/followers","following_url":"https://api.github.com/users/efratshenhar/following{/other_user}","gists_url":"https://api.github.com/users/efratshenhar/gists{/gist_id}","starred_url":"https://api.github.com/users/efratshenhar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/efratshenhar/subscriptions","organizations_url":"https://api.github.com/users/efratshenhar/orgs","repos_url":"https://api.github.com/users/efratshenhar/repos","events_url":"https://api.github.com/users/efratshenhar/events{/privacy}","received_events_url":"https://api.github.com/users/efratshenhar/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/efratshenhar/ravendb","description":"A linq enabled document database for .NET","fork":true,"url":"https://api.github.com/repos/efratshenhar/ravendb","forks_url":"https://api.github.com/repos/efratshenhar/ravendb/forks","keys_url":"https://api.github.com/repos/efratshenhar/ravendb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/efratshenhar/ravendb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/efratshenhar/ravendb/teams","hooks_url":"https://api.github.com/repos/efratshenhar/ravendb/hooks","issue_events_url":"https://api.github.com/repos/efratshenhar/ravendb/issues/events{/number}","events_url":"https://api.github.com/repos/efratshenhar/ravendb/events","assignees_url":"https://api.github.com/repos/efratshenhar/ravendb/assignees{/user}","branches_url":"https://api.github.com/repos/efratshenhar/ravendb/branches{/branch}","tags_url":"https://api.github.com/repos/efratshenhar/ravendb/tags","blobs_url":"https://api.github.com/repos/efratshenhar/ravendb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/efratshenhar/ravendb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/efratshenhar/ravendb/git/refs{/sha}","trees_url":"https://api.github.com/repos/efratshenhar/ravendb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/efratshenhar/ravendb/statuses/{sha}","languages_url":"https://api.github.com/repos/efratshenhar/ravendb/languages","stargazers_url":"https://api.github.com/repos/efratshenhar/ravendb/stargazers","contributors_url":"https://api.github.com/repos/efratshenhar/ravendb/contributors","subscribers_url":"https://api.github.com/repos/efratshenhar/ravendb/subscribers","subscription_url":"https://api.github.com/repos/efratshenhar/ravendb/subscription","commits_url":"https://api.github.com/repos/efratshenhar/ravendb/commits{/sha}","git_commits_url":"https://api.github.com/repos/efratshenhar/ravendb/git/commits{/sha}","comments_url":"https://api.github.com/repos/efratshenhar/ravendb/comments{/number}","issue_comment_url":"https://api.github.com/repos/efratshenhar/ravendb/issues/comments{/number}","contents_url":"https://api.github.com/repos/efratshenhar/ravendb/contents/{+path}","compare_url":"https://api.github.com/repos/efratshenhar/ravendb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/efratshenhar/ravendb/merges","archive_url":"https://api.github.com/repos/efratshenhar/ravendb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/efratshenhar/ravendb/downloads","issues_url":"https://api.github.com/repos/efratshenhar/ravendb/issues{/number}","pulls_url":"https://api.github.com/repos/efratshenhar/ravendb/pulls{/number}","milestones_url":"https://api.github.com/repos/efratshenhar/ravendb/milestones{/number}","notifications_url":"https://api.github.com/repos/efratshenhar/ravendb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/efratshenhar/ravendb/labels{/name}","releases_url":"https://api.github.com/repos/efratshenhar/ravendb/releases{/id}","deployments_url":"https://api.github.com/repos/efratshenhar/ravendb/deployments","created_at":"2016-03-24T13:46:21Z","updated_at":"2016-03-24T13:46:40Z","pushed_at":"2016-06-08T10:38:32Z","git_url":"git://github.com/efratshenhar/ravendb.git","ssh_url":"git@github.com:efratshenhar/ravendb.git","clone_url":"https://github.com/efratshenhar/ravendb.git","svn_url":"https://github.com/efratshenhar/ravendb","homepage":"http://ayende.com/Blog/","size":364501,"stargazers_count":0,"watchers_count":0,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"v3.5"}},"base":{"label":"ayende:v4.0","ref":"v4.0","sha":"a2741bb987eceb18d0c3437fd689648cbaf82671","user":{"login":"ayende","id":116915,"avatar_url":"https://avatars.githubusercontent.com/u/116915?v=3","gravatar_id":"","url":"https://api.github.com/users/ayende","html_url":"https://github.com/ayende","followers_url":"https://api.github.com/users/ayende/followers","following_url":"https://api.github.com/users/ayende/following{/other_user}","gists_url":"https://api.github.com/users/ayende/gists{/gist_id}","starred_url":"https://api.github.com/users/ayende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayende/subscriptions","organizations_url":"https://api.github.com/users/ayende/orgs","repos_url":"https://api.github.com/users/ayende/repos","events_url":"https://api.github.com/users/ayende/events{/privacy}","received_events_url":"https://api.github.com/users/ayende/received_events","type":"User","site_admin":false},"repo":{"id":904641,"name":"ravendb","full_name":"ayende/ravendb","owner":{"login":"ayende","id":116915,"avatar_url":"https://avatars.githubusercontent.com/u/116915?v=3","gravatar_id":"","url":"https://api.github.com/users/ayende","html_url":"https://github.com/ayende","followers_url":"https://api.github.com/users/ayende/followers","following_url":"https://api.github.com/users/ayende/following{/other_user}","gists_url":"https://api.github.com/users/ayende/gists{/gist_id}","starred_url":"https://api.github.com/users/ayende/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayende/subscriptions","organizations_url":"https://api.github.com/users/ayende/orgs","repos_url":"https://api.github.com/users/ayende/repos","events_url":"https://api.github.com/users/ayende/events{/privacy}","received_events_url":"https://api.github.com/users/ayende/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ayende/ravendb","description":"A linq enabled document database for .NET","fork":true,"url":"https://api.github.com/repos/ayende/ravendb","forks_url":"https://api.github.com/repos/ayende/ravendb/forks","keys_url":"https://api.github.com/repos/ayende/ravendb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ayende/ravendb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ayende/ravendb/teams","hooks_url":"https://api.github.com/repos/ayende/ravendb/hooks","issue_events_url":"https://api.github.com/repos/ayende/ravendb/issues/events{/number}","events_url":"https://api.github.com/repos/ayende/ravendb/events","assignees_url":"https://api.github.com/repos/ayende/ravendb/assignees{/user}","branches_url":"https://api.github.com/repos/ayende/ravendb/branches{/branch}","tags_url":"https://api.github.com/repos/ayende/ravendb/tags","blobs_url":"https://api.github.com/repos/ayende/ravendb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ayende/ravendb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ayende/ravendb/git/refs{/sha}","trees_url":"https://api.github.com/repos/ayende/ravendb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ayende/ravendb/statuses/{sha}","languages_url":"https://api.github.com/repos/ayende/ravendb/languages","stargazers_url":"https://api.github.com/repos/ayende/ravendb/stargazers","contributors_url":"https://api.github.com/repos/ayende/ravendb/contributors","subscribers_url":"https://api.github.com/repos/ayende/ravendb/subscribers","subscription_url":"https://api.github.com/repos/ayende/ravendb/subscription","commits_url":"https://api.github.com/repos/ayende/ravendb/commits{/sha}","git_commits_url":"https://api.github.com/repos/ayende/ravendb/git/commits{/sha}","comments_url":"https://api.github.com/repos/ayende/ravendb/comments{/number}","issue_comment_url":"https://api.github.com/repos/ayende/ravendb/issues/comments{/number}","contents_url":"https://api.github.com/repos/ayende/ravendb/contents/{+path}","compare_url":"https://api.github.com/repos/ayende/ravendb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ayende/ravendb/merges","archive_url":"https://api.github.com/repos/ayende/ravendb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ayende/ravendb/downloads","issues_url":"https://api.github.com/repos/ayende/ravendb/issues{/number}","pulls_url":"https://api.github.com/repos/ayende/ravendb/pulls{/number}","milestones_url":"https://api.github.com/repos/ayende/ravendb/milestones{/number}","notifications_url":"https://api.github.com/repos/ayende/ravendb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ayende/ravendb/labels{/name}","releases_url":"https://api.github.com/repos/ayende/ravendb/releases{/id}","deployments_url":"https://api.github.com/repos/ayende/ravendb/deployments","created_at":"2010-09-12T05:30:13Z","updated_at":"2016-05-31T21:51:35Z","pushed_at":"2016-06-08T12:12:52Z","git_url":"git://github.com/ayende/ravendb.git","ssh_url":"git@github.com:ayende/ravendb.git","clone_url":"https://github.com/ayende/ravendb.git","svn_url":"https://github.com/ayende/ravendb","homepage":"http://ayende.com/Blog/","size":522865,"stargazers_count":282,"watchers_count":282,"language":"C#","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":141,"mirror_url":null,"open_issues_count":5,"forks":141,"open_issues":5,"watchers":282,"default_branch":"v3.5"}},"_links":{"self":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/3819"},"html":{"href":"https://github.com/ayende/ravendb/pull/3819"},"issue":{"href":"https://api.github.com/repos/ayende/ravendb/issues/3819"},"comments":{"href":"https://api.github.com/repos/ayende/ravendb/issues/3819/comments"},"review_comments":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/3819/comments"},"review_comment":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ayende/ravendb/pulls/3819/commits"},"statuses":{"href":"https://api.github.com/repos/ayende/ravendb/statuses/9fe48fa01ac10a30fb0a39973a2c4a2eb775e779"}}}}
{"actor":{"display_login":"ayende"}}