{"action":"created","comment":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/172267288","pull_request_review_id":101249034,"id":172267288,"diff_hunk":"@@ -1184,8 +1184,17 @@ int mbedtls_x509_crt_parse_path( mbedtls_x509_crt *chain, const char *path )\n \n     while( ( entry = readdir( dir ) ) != NULL )\n     {\n-        mbedtls_snprintf( entry_name, sizeof entry_name, \"%s/%s\", path, entry->d_name );\n-        //entry_name length is MBEDTLS_X509_MAX_FILE_PATH_LEN  and it includes both path and filename\n+        if( strlen(path) + strlen(entry->d_name) + 1 < MBEDTLS_X509_MAX_FILE_PATH_LEN )\n+        {\n+            mbedtls_snprintf( entry_name, sizeof entry_name, \"%s/%s\", path, entry->d_name );         ","path":"library/x509_crt.c","position":null,"original_position":8,"commit_id":"71a2d60f83efeb634151633b3d8be64ee99f829f","original_commit_id":"71a2d60f83efeb634151633b3d8be64ee99f829f","user":{"login":"gilles-peskine-arm","id":26596258,"avatar_url":"https://avatars3.githubusercontent.com/u/26596258?v=4","gravatar_id":"","url":"https://api.github.com/users/gilles-peskine-arm","html_url":"https://github.com/gilles-peskine-arm","followers_url":"https://api.github.com/users/gilles-peskine-arm/followers","following_url":"https://api.github.com/users/gilles-peskine-arm/following{/other_user}","gists_url":"https://api.github.com/users/gilles-peskine-arm/gists{/gist_id}","starred_url":"https://api.github.com/users/gilles-peskine-arm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gilles-peskine-arm/subscriptions","organizations_url":"https://api.github.com/users/gilles-peskine-arm/orgs","repos_url":"https://api.github.com/users/gilles-peskine-arm/repos","events_url":"https://api.github.com/users/gilles-peskine-arm/events{/privacy}","received_events_url":"https://api.github.com/users/gilles-peskine-arm/received_events","type":"User","site_admin":false},"body":"Please remove the trailing whitespace.\r\n\r\nAs it happens we'll soon have a script that rejects all trailing whitespace.","created_at":"2018-03-05T17:34:51Z","updated_at":"2018-03-05T17:53:18Z","html_url":"https://github.com/ARMmbed/mbedtls/pull/1405#discussion_r172267288","pull_request_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments/172267288"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/1405#discussion_r172267288"},"pull_request":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405"}}},"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405","id":171230968,"html_url":"https://github.com/ARMmbed/mbedtls/pull/1405","diff_url":"https://github.com/ARMmbed/mbedtls/pull/1405.diff","patch_url":"https://github.com/ARMmbed/mbedtls/pull/1405.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/1405","number":1405,"state":"open","locked":false,"title":"Fix Build failure of Mbed TLS 1.3 and 2.1 with GCC 7","user":{"login":"Alonof","id":4798395,"avatar_url":"https://avatars3.githubusercontent.com/u/4798395?v=4","gravatar_id":"","url":"https://api.github.com/users/Alonof","html_url":"https://github.com/Alonof","followers_url":"https://api.github.com/users/Alonof/followers","following_url":"https://api.github.com/users/Alonof/following{/other_user}","gists_url":"https://api.github.com/users/Alonof/gists{/gist_id}","starred_url":"https://api.github.com/users/Alonof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alonof/subscriptions","organizations_url":"https://api.github.com/users/Alonof/orgs","repos_url":"https://api.github.com/users/Alonof/repos","events_url":"https://api.github.com/users/Alonof/events{/privacy}","received_events_url":"https://api.github.com/users/Alonof/received_events","type":"User","site_admin":false},"body":"## Description\r\n In function `mbedtls_x509_crt_parse_path` resize buffer `entry_name` from 255 to 512,\r\nto avoid overflow of destination buffer. Defined as `MBEDTLS_X509_MAX_FILE_PATH_LEN`. \r\nresolves #1188 \r\n\r\n## Status\r\n**READY**\r\n\r\n## Requires Backporting\r\nNo this reproduces only on 2.1 \r\n\r\n\r\n## Additional comments\r\nthe length of `entry_name` buffer  includes path and filename at max length of 512 chars \r\n\r\n## Todos\r\n- [ ] Tests\r\n- [ ] Documentation\r\n- [x] Changelog updated\r\n- [ ] Backported\r\n\r\n\r\n## Steps to test or reproduce\r\nOutline the steps to test or reproduce the PR here.\r\n","created_at":"2018-02-25T13:49:00Z","updated_at":"2018-03-05T17:53:19Z","closed_at":null,"merged_at":null,"merge_commit_sha":"47cde6efb9b115d951903c79495cfc91f28d610f","assignee":null,"assignees":[],"requested_reviewers":[{"login":"Patater","id":410816,"avatar_url":"https://avatars0.githubusercontent.com/u/410816?v=4","gravatar_id":"","url":"https://api.github.com/users/Patater","html_url":"https://github.com/Patater","followers_url":"https://api.github.com/users/Patater/followers","following_url":"https://api.github.com/users/Patater/following{/other_user}","gists_url":"https://api.github.com/users/Patater/gists{/gist_id}","starred_url":"https://api.github.com/users/Patater/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Patater/subscriptions","organizations_url":"https://api.github.com/users/Patater/orgs","repos_url":"https://api.github.com/users/Patater/repos","events_url":"https://api.github.com/users/Patater/events{/privacy}","received_events_url":"https://api.github.com/users/Patater/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":820027428,"url":"https://api.github.com/repos/ARMmbed/mbedtls/labels/Arm%20Contribution","name":"Arm Contribution","color":"66e0ff","default":false},{"id":19280384,"url":"https://api.github.com/repos/ARMmbed/mbedtls/labels/bug","name":"bug","color":"d93f0b","default":true}],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/1405/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/71a2d60f83efeb634151633b3d8be64ee99f829f","head":{"label":"Alonof:iotssl_1936","ref":"iotssl_1936","sha":"71a2d60f83efeb634151633b3d8be64ee99f829f","user":{"login":"Alonof","id":4798395,"avatar_url":"https://avatars3.githubusercontent.com/u/4798395?v=4","gravatar_id":"","url":"https://api.github.com/users/Alonof","html_url":"https://github.com/Alonof","followers_url":"https://api.github.com/users/Alonof/followers","following_url":"https://api.github.com/users/Alonof/following{/other_user}","gists_url":"https://api.github.com/users/Alonof/gists{/gist_id}","starred_url":"https://api.github.com/users/Alonof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alonof/subscriptions","organizations_url":"https://api.github.com/users/Alonof/orgs","repos_url":"https://api.github.com/users/Alonof/repos","events_url":"https://api.github.com/users/Alonof/events{/privacy}","received_events_url":"https://api.github.com/users/Alonof/received_events","type":"User","site_admin":false},"repo":{"id":122817360,"name":"mbedtls","full_name":"Alonof/mbedtls","owner":{"login":"Alonof","id":4798395,"avatar_url":"https://avatars3.githubusercontent.com/u/4798395?v=4","gravatar_id":"","url":"https://api.github.com/users/Alonof","html_url":"https://github.com/Alonof","followers_url":"https://api.github.com/users/Alonof/followers","following_url":"https://api.github.com/users/Alonof/following{/other_user}","gists_url":"https://api.github.com/users/Alonof/gists{/gist_id}","starred_url":"https://api.github.com/users/Alonof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alonof/subscriptions","organizations_url":"https://api.github.com/users/Alonof/orgs","repos_url":"https://api.github.com/users/Alonof/repos","events_url":"https://api.github.com/users/Alonof/events{/privacy}","received_events_url":"https://api.github.com/users/Alonof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Alonof/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":true,"url":"https://api.github.com/repos/Alonof/mbedtls","forks_url":"https://api.github.com/repos/Alonof/mbedtls/forks","keys_url":"https://api.github.com/repos/Alonof/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Alonof/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Alonof/mbedtls/teams","hooks_url":"https://api.github.com/repos/Alonof/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/Alonof/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/Alonof/mbedtls/events","assignees_url":"https://api.github.com/repos/Alonof/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/Alonof/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/Alonof/mbedtls/tags","blobs_url":"https://api.github.com/repos/Alonof/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Alonof/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Alonof/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/Alonof/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Alonof/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/Alonof/mbedtls/languages","stargazers_url":"https://api.github.com/repos/Alonof/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/Alonof/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/Alonof/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/Alonof/mbedtls/subscription","commits_url":"https://api.github.com/repos/Alonof/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/Alonof/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/Alonof/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/Alonof/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/Alonof/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/Alonof/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Alonof/mbedtls/merges","archive_url":"https://api.github.com/repos/Alonof/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Alonof/mbedtls/downloads","issues_url":"https://api.github.com/repos/Alonof/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/Alonof/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/Alonof/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/Alonof/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Alonof/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/Alonof/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/Alonof/mbedtls/deployments","created_at":"2018-02-25T08:11:27Z","updated_at":"2018-02-25T08:11:32Z","pushed_at":"2018-03-05T14:44:53Z","git_url":"git://github.com/Alonof/mbedtls.git","ssh_url":"git@github.com:Alonof/mbedtls.git","clone_url":"https://github.com/Alonof/mbedtls.git","svn_url":"https://github.com/Alonof/mbedtls","homepage":"https://tls.mbed.org","size":24812,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"development"}},"base":{"label":"ARMmbed:mbedtls-2.1","ref":"mbedtls-2.1","sha":"25ec9cc9b3f8a391945cc4a2545c206200d47878","user":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":6687936,"name":"mbedtls","full_name":"ARMmbed/mbedtls","owner":{"login":"ARMmbed","id":8916057,"avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ARMmbed/mbedtls","description":"An open source, portable, easy to use, readable and flexible SSL library","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbedtls","forks_url":"https://api.github.com/repos/ARMmbed/mbedtls/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbedtls/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbedtls/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbedtls/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbedtls/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbedtls/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbedtls/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbedtls/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbedtls/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbedtls/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbedtls/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbedtls/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbedtls/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbedtls/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbedtls/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbedtls/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbedtls/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbedtls/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbedtls/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbedtls/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbedtls/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbedtls/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbedtls/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbedtls/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbedtls/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbedtls/deployments","created_at":"2012-11-14T13:13:13Z","updated_at":"2018-03-05T09:26:10Z","pushed_at":"2018-03-05T09:47:24Z","git_url":"git://github.com/ARMmbed/mbedtls.git","ssh_url":"git@github.com:ARMmbed/mbedtls.git","clone_url":"https://github.com/ARMmbed/mbedtls.git","svn_url":"https://github.com/ARMmbed/mbedtls","homepage":"https://tls.mbed.org","size":24952,"stargazers_count":1284,"watchers_count":1284,"language":"C","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":800,"mirror_url":null,"archived":false,"open_issues_count":439,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":800,"open_issues":439,"watchers":1284,"default_branch":"development"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405"},"html":{"href":"https://github.com/ARMmbed/mbedtls/pull/1405"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/1405"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/issues/1405/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/pulls/1405/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbedtls/statuses/71a2d60f83efeb634151633b3d8be64ee99f829f"}},"author_association":"NONE"}}
{"actor":{"display_login":"gilles-peskine-arm"}}