{"action":"created","comment":{"url":"https://api.github.com/repos/saghul/pycares/pulls/comments/66214932","id":66214932,"diff_hunk":"@@ -486,16 +488,40 @@ query_txt_cb(void *arg, int status,int timeouts, unsigned char *answer_buf, int\n         goto callback;\n     }\n \n-    for (txt_ptr = txt_reply; txt_ptr != NULL; txt_ptr = txt_ptr->next) {\n-        tmp = PyStructSequence_New(&AresQueryTXTResultType);\n-        if (tmp == NULL) {\n+    tmp_obj = NULL;\n+    assembled_txt = NULL;\n+    txt_ptr = txt_reply;\n+    while (1) {\n+        if (txt_ptr == NULL || (txt_ptr->record_start == 1 && tmp_obj != NULL)) {","path":"src/cares.c","position":40,"original_position":40,"commit_id":"50a28a71e571818852c411f26b032e6ce4b82a51","original_commit_id":"50a28a71e571818852c411f26b032e6ce4b82a51","user":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"body":"it's possible you end up here having txt_ptr and tmp_obj both NULL.","created_at":"2016-06-08T08:45:39Z","updated_at":"2016-06-08T08:45:39Z","html_url":"https://github.com/saghul/pycares/pull/31#discussion_r66214932","pull_request_url":"https://api.github.com/repos/saghul/pycares/pulls/31","_links":{"self":{"href":"https://api.github.com/repos/saghul/pycares/pulls/comments/66214932"},"html":{"href":"https://github.com/saghul/pycares/pull/31#discussion_r66214932"},"pull_request":{"href":"https://api.github.com/repos/saghul/pycares/pulls/31"}}},"pull_request":{"url":"https://api.github.com/repos/saghul/pycares/pulls/31","id":71991044,"html_url":"https://github.com/saghul/pycares/pull/31","diff_url":"https://github.com/saghul/pycares/pull/31.diff","patch_url":"https://github.com/saghul/pycares/pull/31.patch","issue_url":"https://api.github.com/repos/saghul/pycares/issues/31","number":31,"state":"open","locked":false,"title":"Chunked txt fix","user":{"login":"VSSRS","id":2574959,"avatar_url":"https://avatars.githubusercontent.com/u/2574959?v=3","gravatar_id":"","url":"https://api.github.com/users/VSSRS","html_url":"https://github.com/VSSRS","followers_url":"https://api.github.com/users/VSSRS/followers","following_url":"https://api.github.com/users/VSSRS/following{/other_user}","gists_url":"https://api.github.com/users/VSSRS/gists{/gist_id}","starred_url":"https://api.github.com/users/VSSRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSSRS/subscriptions","organizations_url":"https://api.github.com/users/VSSRS/orgs","repos_url":"https://api.github.com/users/VSSRS/repos","events_url":"https://api.github.com/users/VSSRS/events{/privacy}","received_events_url":"https://api.github.com/users/VSSRS/received_events","type":"User","site_admin":false},"body":"I've drafted the incorporation of the ares_parse_txt_reply_ext API in Pycares and included some tests for it.\r\nI encourage you to make a pass over the code, as I'm definitely not a C programmer.\r\n\r\nCheers.","created_at":"2016-05-31T10:19:08Z","updated_at":"2016-06-08T08:45:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bfb6a78561b88d9c580dabc16125338393c602fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/saghul/pycares/pulls/31/commits","review_comments_url":"https://api.github.com/repos/saghul/pycares/pulls/31/comments","review_comment_url":"https://api.github.com/repos/saghul/pycares/pulls/comments{/number}","comments_url":"https://api.github.com/repos/saghul/pycares/issues/31/comments","statuses_url":"https://api.github.com/repos/saghul/pycares/statuses/50a28a71e571818852c411f26b032e6ce4b82a51","head":{"label":"VSSRS:chunked_txt_fix","ref":"chunked_txt_fix","sha":"50a28a71e571818852c411f26b032e6ce4b82a51","user":{"login":"VSSRS","id":2574959,"avatar_url":"https://avatars.githubusercontent.com/u/2574959?v=3","gravatar_id":"","url":"https://api.github.com/users/VSSRS","html_url":"https://github.com/VSSRS","followers_url":"https://api.github.com/users/VSSRS/followers","following_url":"https://api.github.com/users/VSSRS/following{/other_user}","gists_url":"https://api.github.com/users/VSSRS/gists{/gist_id}","starred_url":"https://api.github.com/users/VSSRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSSRS/subscriptions","organizations_url":"https://api.github.com/users/VSSRS/orgs","repos_url":"https://api.github.com/users/VSSRS/repos","events_url":"https://api.github.com/users/VSSRS/events{/privacy}","received_events_url":"https://api.github.com/users/VSSRS/received_events","type":"User","site_admin":false},"repo":{"id":60023364,"name":"pycares","full_name":"VSSRS/pycares","owner":{"login":"VSSRS","id":2574959,"avatar_url":"https://avatars.githubusercontent.com/u/2574959?v=3","gravatar_id":"","url":"https://api.github.com/users/VSSRS","html_url":"https://github.com/VSSRS","followers_url":"https://api.github.com/users/VSSRS/followers","following_url":"https://api.github.com/users/VSSRS/following{/other_user}","gists_url":"https://api.github.com/users/VSSRS/gists{/gist_id}","starred_url":"https://api.github.com/users/VSSRS/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VSSRS/subscriptions","organizations_url":"https://api.github.com/users/VSSRS/orgs","repos_url":"https://api.github.com/users/VSSRS/repos","events_url":"https://api.github.com/users/VSSRS/events{/privacy}","received_events_url":"https://api.github.com/users/VSSRS/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/VSSRS/pycares","description":"Python interface for c-ares","fork":true,"url":"https://api.github.com/repos/VSSRS/pycares","forks_url":"https://api.github.com/repos/VSSRS/pycares/forks","keys_url":"https://api.github.com/repos/VSSRS/pycares/keys{/key_id}","collaborators_url":"https://api.github.com/repos/VSSRS/pycares/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/VSSRS/pycares/teams","hooks_url":"https://api.github.com/repos/VSSRS/pycares/hooks","issue_events_url":"https://api.github.com/repos/VSSRS/pycares/issues/events{/number}","events_url":"https://api.github.com/repos/VSSRS/pycares/events","assignees_url":"https://api.github.com/repos/VSSRS/pycares/assignees{/user}","branches_url":"https://api.github.com/repos/VSSRS/pycares/branches{/branch}","tags_url":"https://api.github.com/repos/VSSRS/pycares/tags","blobs_url":"https://api.github.com/repos/VSSRS/pycares/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/VSSRS/pycares/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/VSSRS/pycares/git/refs{/sha}","trees_url":"https://api.github.com/repos/VSSRS/pycares/git/trees{/sha}","statuses_url":"https://api.github.com/repos/VSSRS/pycares/statuses/{sha}","languages_url":"https://api.github.com/repos/VSSRS/pycares/languages","stargazers_url":"https://api.github.com/repos/VSSRS/pycares/stargazers","contributors_url":"https://api.github.com/repos/VSSRS/pycares/contributors","subscribers_url":"https://api.github.com/repos/VSSRS/pycares/subscribers","subscription_url":"https://api.github.com/repos/VSSRS/pycares/subscription","commits_url":"https://api.github.com/repos/VSSRS/pycares/commits{/sha}","git_commits_url":"https://api.github.com/repos/VSSRS/pycares/git/commits{/sha}","comments_url":"https://api.github.com/repos/VSSRS/pycares/comments{/number}","issue_comment_url":"https://api.github.com/repos/VSSRS/pycares/issues/comments{/number}","contents_url":"https://api.github.com/repos/VSSRS/pycares/contents/{+path}","compare_url":"https://api.github.com/repos/VSSRS/pycares/compare/{base}...{head}","merges_url":"https://api.github.com/repos/VSSRS/pycares/merges","archive_url":"https://api.github.com/repos/VSSRS/pycares/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/VSSRS/pycares/downloads","issues_url":"https://api.github.com/repos/VSSRS/pycares/issues{/number}","pulls_url":"https://api.github.com/repos/VSSRS/pycares/pulls{/number}","milestones_url":"https://api.github.com/repos/VSSRS/pycares/milestones{/number}","notifications_url":"https://api.github.com/repos/VSSRS/pycares/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/VSSRS/pycares/labels{/name}","releases_url":"https://api.github.com/repos/VSSRS/pycares/releases{/id}","deployments_url":"https://api.github.com/repos/VSSRS/pycares/deployments","created_at":"2016-05-30T16:16:10Z","updated_at":"2016-05-30T16:16:12Z","pushed_at":"2016-06-08T08:32:17Z","git_url":"git://github.com/VSSRS/pycares.git","ssh_url":"git@github.com:VSSRS/pycares.git","clone_url":"https://github.com/VSSRS/pycares.git","svn_url":"https://github.com/VSSRS/pycares","homepage":"https://pypi.python.org/pypi/pycares","size":519,"stargazers_count":0,"watchers_count":0,"language":"C","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":"saghul:master","ref":"master","sha":"0201657b64db10bae432612645a6b282b23dfa61","user":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"repo":{"id":4949798,"name":"pycares","full_name":"saghul/pycares","owner":{"login":"saghul","id":317464,"avatar_url":"https://avatars.githubusercontent.com/u/317464?v=3","gravatar_id":"","url":"https://api.github.com/users/saghul","html_url":"https://github.com/saghul","followers_url":"https://api.github.com/users/saghul/followers","following_url":"https://api.github.com/users/saghul/following{/other_user}","gists_url":"https://api.github.com/users/saghul/gists{/gist_id}","starred_url":"https://api.github.com/users/saghul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saghul/subscriptions","organizations_url":"https://api.github.com/users/saghul/orgs","repos_url":"https://api.github.com/users/saghul/repos","events_url":"https://api.github.com/users/saghul/events{/privacy}","received_events_url":"https://api.github.com/users/saghul/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/saghul/pycares","description":"Python interface for c-ares","fork":false,"url":"https://api.github.com/repos/saghul/pycares","forks_url":"https://api.github.com/repos/saghul/pycares/forks","keys_url":"https://api.github.com/repos/saghul/pycares/keys{/key_id}","collaborators_url":"https://api.github.com/repos/saghul/pycares/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/saghul/pycares/teams","hooks_url":"https://api.github.com/repos/saghul/pycares/hooks","issue_events_url":"https://api.github.com/repos/saghul/pycares/issues/events{/number}","events_url":"https://api.github.com/repos/saghul/pycares/events","assignees_url":"https://api.github.com/repos/saghul/pycares/assignees{/user}","branches_url":"https://api.github.com/repos/saghul/pycares/branches{/branch}","tags_url":"https://api.github.com/repos/saghul/pycares/tags","blobs_url":"https://api.github.com/repos/saghul/pycares/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/saghul/pycares/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/saghul/pycares/git/refs{/sha}","trees_url":"https://api.github.com/repos/saghul/pycares/git/trees{/sha}","statuses_url":"https://api.github.com/repos/saghul/pycares/statuses/{sha}","languages_url":"https://api.github.com/repos/saghul/pycares/languages","stargazers_url":"https://api.github.com/repos/saghul/pycares/stargazers","contributors_url":"https://api.github.com/repos/saghul/pycares/contributors","subscribers_url":"https://api.github.com/repos/saghul/pycares/subscribers","subscription_url":"https://api.github.com/repos/saghul/pycares/subscription","commits_url":"https://api.github.com/repos/saghul/pycares/commits{/sha}","git_commits_url":"https://api.github.com/repos/saghul/pycares/git/commits{/sha}","comments_url":"https://api.github.com/repos/saghul/pycares/comments{/number}","issue_comment_url":"https://api.github.com/repos/saghul/pycares/issues/comments{/number}","contents_url":"https://api.github.com/repos/saghul/pycares/contents/{+path}","compare_url":"https://api.github.com/repos/saghul/pycares/compare/{base}...{head}","merges_url":"https://api.github.com/repos/saghul/pycares/merges","archive_url":"https://api.github.com/repos/saghul/pycares/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/saghul/pycares/downloads","issues_url":"https://api.github.com/repos/saghul/pycares/issues{/number}","pulls_url":"https://api.github.com/repos/saghul/pycares/pulls{/number}","milestones_url":"https://api.github.com/repos/saghul/pycares/milestones{/number}","notifications_url":"https://api.github.com/repos/saghul/pycares/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/saghul/pycares/labels{/name}","releases_url":"https://api.github.com/repos/saghul/pycares/releases{/id}","deployments_url":"https://api.github.com/repos/saghul/pycares/deployments","created_at":"2012-07-08T20:55:01Z","updated_at":"2016-05-25T22:50:54Z","pushed_at":"2016-06-08T08:32:18Z","git_url":"git://github.com/saghul/pycares.git","ssh_url":"git@github.com:saghul/pycares.git","clone_url":"https://github.com/saghul/pycares.git","svn_url":"https://github.com/saghul/pycares","homepage":"https://pypi.python.org/pypi/pycares","size":530,"stargazers_count":50,"watchers_count":50,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":21,"mirror_url":null,"open_issues_count":2,"forks":21,"open_issues":2,"watchers":50,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/saghul/pycares/pulls/31"},"html":{"href":"https://github.com/saghul/pycares/pull/31"},"issue":{"href":"https://api.github.com/repos/saghul/pycares/issues/31"},"comments":{"href":"https://api.github.com/repos/saghul/pycares/issues/31/comments"},"review_comments":{"href":"https://api.github.com/repos/saghul/pycares/pulls/31/comments"},"review_comment":{"href":"https://api.github.com/repos/saghul/pycares/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/saghul/pycares/pulls/31/commits"},"statuses":{"href":"https://api.github.com/repos/saghul/pycares/statuses/50a28a71e571818852c411f26b032e6ce4b82a51"}}}}
{"actor":{"display_login":"saghul"}}