{"action":"created","comment":{"url":"https://api.github.com/repos/openssl/openssl/pulls/comments/69274895","id":69274895,"diff_hunk":"@@ -12,23 +12,53 @@\n #include <openssl/crypto.h>\n #include \"bio_lcl.h\"\n #include \"internal/cryptlib.h\"\n-#include <openssl/stack.h>\n \n BIO *BIO_new(const BIO_METHOD *method)\n {\n-    BIO *ret = OPENSSL_malloc(sizeof(*ret));\n+    BIO *bio = OPENSSL_zalloc(sizeof(*bio));\n \n-    if (ret == NULL) {\n+    if (bio == NULL) {\n         BIOerr(BIO_F_BIO_NEW, ERR_R_MALLOC_FAILURE);\n         return (NULL);\n     }\n-    if (!BIO_set(ret, method)) {\n-        OPENSSL_free(ret);\n-        ret = NULL;\n+\n+    bio->shutdown = 1;\n+    bio->references = 1;\n+    bio->method = method;\n+\n+    bio->lock = CRYPTO_THREAD_lock_new();\n+    if (bio->lock == NULL) {\n+        BIOerr(BIO_F_BIO_SET, ERR_R_MALLOC_FAILURE);\n+        goto err;\n     }\n-    return (ret);\n+\n+    if (!CRYPTO_new_ex_data(CRYPTO_EX_INDEX_BIO, bio, &bio->ex_data)) {\n+        CRYPTO_THREAD_lock_free(bio->lock);\n+        goto err;\n+    }\n+\n+    if (method->create != NULL) {\n+        if (!method->create(bio)) {\n+            BIOerr(BIO_F_BIO_SET, ERR_R_INIT_FAIL);","path":"crypto/bio/bio_lib.c","position":38,"original_position":38,"commit_id":"82142fe619badca59e73fe872702541b235ef6c4","original_commit_id":"82142fe619badca59e73fe872702541b235ef6c4","user":{"login":"mattcaswell","id":7422273,"avatar_url":"https://avatars.githubusercontent.com/u/7422273?v=3","gravatar_id":"","url":"https://api.github.com/users/mattcaswell","html_url":"https://github.com/mattcaswell","followers_url":"https://api.github.com/users/mattcaswell/followers","following_url":"https://api.github.com/users/mattcaswell/following{/other_user}","gists_url":"https://api.github.com/users/mattcaswell/gists{/gist_id}","starred_url":"https://api.github.com/users/mattcaswell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattcaswell/subscriptions","organizations_url":"https://api.github.com/users/mattcaswell/orgs","repos_url":"https://api.github.com/users/mattcaswell/repos","events_url":"https://api.github.com/users/mattcaswell/events{/privacy}","received_events_url":"https://api.github.com/users/mattcaswell/received_events","type":"User","site_admin":false},"body":"and here","created_at":"2016-07-01T09:44:46Z","updated_at":"2016-07-01T09:44:46Z","html_url":"https://github.com/openssl/openssl/pull/1261#discussion_r69274895","pull_request_url":"https://api.github.com/repos/openssl/openssl/pulls/1261","_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments/69274895"},"html":{"href":"https://github.com/openssl/openssl/pull/1261#discussion_r69274895"},"pull_request":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1261"}}},"pull_request":{"url":"https://api.github.com/repos/openssl/openssl/pulls/1261","id":75386755,"html_url":"https://github.com/openssl/openssl/pull/1261","diff_url":"https://github.com/openssl/openssl/pull/1261.diff","patch_url":"https://github.com/openssl/openssl/pull/1261.patch","issue_url":"https://api.github.com/repos/openssl/openssl/issues/1261","number":1261,"state":"open","locked":false,"title":"Deprecate BIO_set() method","user":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"body":"It is now deprecated as :\r\n- BIO type is now opaque, so no more stack-allocable.\r\n- the new locking API is locking now each BIO object individually.","created_at":"2016-06-27T21:55:36Z","updated_at":"2016-07-01T09:44:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"439645857eeabbbcd11b973abd3dd4235752b62e","assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/openssl/openssl/milestones/1","html_url":"https://github.com/openssl/openssl/milestones/1.1.0","labels_url":"https://api.github.com/repos/openssl/openssl/milestones/1/labels","id":1748232,"number":1,"title":"1.1.0","description":"","creator":{"login":"levitte","id":698918,"avatar_url":"https://avatars.githubusercontent.com/u/698918?v=3","gravatar_id":"","url":"https://api.github.com/users/levitte","html_url":"https://github.com/levitte","followers_url":"https://api.github.com/users/levitte/followers","following_url":"https://api.github.com/users/levitte/following{/other_user}","gists_url":"https://api.github.com/users/levitte/gists{/gist_id}","starred_url":"https://api.github.com/users/levitte/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/levitte/subscriptions","organizations_url":"https://api.github.com/users/levitte/orgs","repos_url":"https://api.github.com/users/levitte/repos","events_url":"https://api.github.com/users/levitte/events{/privacy}","received_events_url":"https://api.github.com/users/levitte/received_events","type":"User","site_admin":false},"open_issues":19,"closed_issues":160,"state":"open","created_at":"2016-05-04T17:53:39Z","updated_at":"2016-07-01T08:52:48Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/openssl/openssl/pulls/1261/commits","review_comments_url":"https://api.github.com/repos/openssl/openssl/pulls/1261/comments","review_comment_url":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}","comments_url":"https://api.github.com/repos/openssl/openssl/issues/1261/comments","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/82142fe619badca59e73fe872702541b235ef6c4","head":{"label":"FdaSilvaYY:Deprecate-BIO_set","ref":"Deprecate-BIO_set","sha":"82142fe619badca59e73fe872702541b235ef6c4","user":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"repo":{"id":50681795,"name":"openssl","full_name":"FdaSilvaYY/openssl","owner":{"login":"FdaSilvaYY","id":15791524,"avatar_url":"https://avatars.githubusercontent.com/u/15791524?v=3","gravatar_id":"","url":"https://api.github.com/users/FdaSilvaYY","html_url":"https://github.com/FdaSilvaYY","followers_url":"https://api.github.com/users/FdaSilvaYY/followers","following_url":"https://api.github.com/users/FdaSilvaYY/following{/other_user}","gists_url":"https://api.github.com/users/FdaSilvaYY/gists{/gist_id}","starred_url":"https://api.github.com/users/FdaSilvaYY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/FdaSilvaYY/subscriptions","organizations_url":"https://api.github.com/users/FdaSilvaYY/orgs","repos_url":"https://api.github.com/users/FdaSilvaYY/repos","events_url":"https://api.github.com/users/FdaSilvaYY/events{/privacy}","received_events_url":"https://api.github.com/users/FdaSilvaYY/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/FdaSilvaYY/openssl","description":"TLS/SSL and crypto library","fork":true,"url":"https://api.github.com/repos/FdaSilvaYY/openssl","forks_url":"https://api.github.com/repos/FdaSilvaYY/openssl/forks","keys_url":"https://api.github.com/repos/FdaSilvaYY/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/FdaSilvaYY/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/FdaSilvaYY/openssl/teams","hooks_url":"https://api.github.com/repos/FdaSilvaYY/openssl/hooks","issue_events_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/FdaSilvaYY/openssl/events","assignees_url":"https://api.github.com/repos/FdaSilvaYY/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/FdaSilvaYY/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/FdaSilvaYY/openssl/tags","blobs_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/FdaSilvaYY/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/FdaSilvaYY/openssl/languages","stargazers_url":"https://api.github.com/repos/FdaSilvaYY/openssl/stargazers","contributors_url":"https://api.github.com/repos/FdaSilvaYY/openssl/contributors","subscribers_url":"https://api.github.com/repos/FdaSilvaYY/openssl/subscribers","subscription_url":"https://api.github.com/repos/FdaSilvaYY/openssl/subscription","commits_url":"https://api.github.com/repos/FdaSilvaYY/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/FdaSilvaYY/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/FdaSilvaYY/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/FdaSilvaYY/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/FdaSilvaYY/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/FdaSilvaYY/openssl/merges","archive_url":"https://api.github.com/repos/FdaSilvaYY/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/FdaSilvaYY/openssl/downloads","issues_url":"https://api.github.com/repos/FdaSilvaYY/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/FdaSilvaYY/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/FdaSilvaYY/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/FdaSilvaYY/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/FdaSilvaYY/openssl/labels{/name}","releases_url":"https://api.github.com/repos/FdaSilvaYY/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/FdaSilvaYY/openssl/deployments","created_at":"2016-01-29T18:20:16Z","updated_at":"2016-01-29T18:20:27Z","pushed_at":"2016-06-29T22:20:15Z","git_url":"git://github.com/FdaSilvaYY/openssl.git","ssh_url":"git@github.com:FdaSilvaYY/openssl.git","clone_url":"https://github.com/FdaSilvaYY/openssl.git","svn_url":"https://github.com/FdaSilvaYY/openssl","homepage":"https://www.openssl.org","size":90674,"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":"master"}},"base":{"label":"openssl:master","ref":"master","sha":"03cb37acec0c23a01bee4357cd59ec9f97e528ba","user":{"login":"openssl","id":3279138,"avatar_url":"https://avatars.githubusercontent.com/u/3279138?v=3","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"repo":{"id":7634677,"name":"openssl","full_name":"openssl/openssl","owner":{"login":"openssl","id":3279138,"avatar_url":"https://avatars.githubusercontent.com/u/3279138?v=3","gravatar_id":"","url":"https://api.github.com/users/openssl","html_url":"https://github.com/openssl","followers_url":"https://api.github.com/users/openssl/followers","following_url":"https://api.github.com/users/openssl/following{/other_user}","gists_url":"https://api.github.com/users/openssl/gists{/gist_id}","starred_url":"https://api.github.com/users/openssl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/openssl/subscriptions","organizations_url":"https://api.github.com/users/openssl/orgs","repos_url":"https://api.github.com/users/openssl/repos","events_url":"https://api.github.com/users/openssl/events{/privacy}","received_events_url":"https://api.github.com/users/openssl/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/openssl/openssl","description":"TLS/SSL and crypto library","fork":false,"url":"https://api.github.com/repos/openssl/openssl","forks_url":"https://api.github.com/repos/openssl/openssl/forks","keys_url":"https://api.github.com/repos/openssl/openssl/keys{/key_id}","collaborators_url":"https://api.github.com/repos/openssl/openssl/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/openssl/openssl/teams","hooks_url":"https://api.github.com/repos/openssl/openssl/hooks","issue_events_url":"https://api.github.com/repos/openssl/openssl/issues/events{/number}","events_url":"https://api.github.com/repos/openssl/openssl/events","assignees_url":"https://api.github.com/repos/openssl/openssl/assignees{/user}","branches_url":"https://api.github.com/repos/openssl/openssl/branches{/branch}","tags_url":"https://api.github.com/repos/openssl/openssl/tags","blobs_url":"https://api.github.com/repos/openssl/openssl/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/openssl/openssl/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/openssl/openssl/git/refs{/sha}","trees_url":"https://api.github.com/repos/openssl/openssl/git/trees{/sha}","statuses_url":"https://api.github.com/repos/openssl/openssl/statuses/{sha}","languages_url":"https://api.github.com/repos/openssl/openssl/languages","stargazers_url":"https://api.github.com/repos/openssl/openssl/stargazers","contributors_url":"https://api.github.com/repos/openssl/openssl/contributors","subscribers_url":"https://api.github.com/repos/openssl/openssl/subscribers","subscription_url":"https://api.github.com/repos/openssl/openssl/subscription","commits_url":"https://api.github.com/repos/openssl/openssl/commits{/sha}","git_commits_url":"https://api.github.com/repos/openssl/openssl/git/commits{/sha}","comments_url":"https://api.github.com/repos/openssl/openssl/comments{/number}","issue_comment_url":"https://api.github.com/repos/openssl/openssl/issues/comments{/number}","contents_url":"https://api.github.com/repos/openssl/openssl/contents/{+path}","compare_url":"https://api.github.com/repos/openssl/openssl/compare/{base}...{head}","merges_url":"https://api.github.com/repos/openssl/openssl/merges","archive_url":"https://api.github.com/repos/openssl/openssl/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/openssl/openssl/downloads","issues_url":"https://api.github.com/repos/openssl/openssl/issues{/number}","pulls_url":"https://api.github.com/repos/openssl/openssl/pulls{/number}","milestones_url":"https://api.github.com/repos/openssl/openssl/milestones{/number}","notifications_url":"https://api.github.com/repos/openssl/openssl/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/openssl/openssl/labels{/name}","releases_url":"https://api.github.com/repos/openssl/openssl/releases{/id}","deployments_url":"https://api.github.com/repos/openssl/openssl/deployments","created_at":"2013-01-15T22:34:48Z","updated_at":"2016-07-01T08:57:48Z","pushed_at":"2016-07-01T09:43:24Z","git_url":"git://github.com/openssl/openssl.git","ssh_url":"git@github.com:openssl/openssl.git","clone_url":"https://github.com/openssl/openssl.git","svn_url":"https://github.com/openssl/openssl","homepage":"https://www.openssl.org","size":111416,"stargazers_count":2827,"watchers_count":2827,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1624,"mirror_url":null,"open_issues_count":105,"forks":1624,"open_issues":105,"watchers":2827,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1261"},"html":{"href":"https://github.com/openssl/openssl/pull/1261"},"issue":{"href":"https://api.github.com/repos/openssl/openssl/issues/1261"},"comments":{"href":"https://api.github.com/repos/openssl/openssl/issues/1261/comments"},"review_comments":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1261/comments"},"review_comment":{"href":"https://api.github.com/repos/openssl/openssl/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/openssl/openssl/pulls/1261/commits"},"statuses":{"href":"https://api.github.com/repos/openssl/openssl/statuses/82142fe619badca59e73fe872702541b235ef6c4"}}}}
{"actor":{"display_login":"mattcaswell"}}