{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/5476","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5476/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5476/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5476/events","html_url":"https://github.com/bazelbuild/bazel/pull/5476","id":336062178,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NjA1MzUx","number":5476,"title":"Use const char a[] if sizeof is used to get length","user":{"login":"rongjiecomputer","id":13115060,"node_id":"MDQ6VXNlcjEzMTE1MDYw","avatar_url":"https://avatars2.githubusercontent.com/u/13115060?v=4","gravatar_id":"","url":"https://api.github.com/users/rongjiecomputer","html_url":"https://github.com/rongjiecomputer","followers_url":"https://api.github.com/users/rongjiecomputer/followers","following_url":"https://api.github.com/users/rongjiecomputer/following{/other_user}","gists_url":"https://api.github.com/users/rongjiecomputer/gists{/gist_id}","starred_url":"https://api.github.com/users/rongjiecomputer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rongjiecomputer/subscriptions","organizations_url":"https://api.github.com/users/rongjiecomputer/orgs","repos_url":"https://api.github.com/users/rongjiecomputer/repos","events_url":"https://api.github.com/users/rongjiecomputer/events{/privacy}","received_events_url":"https://api.github.com/users/rongjiecomputer/received_events","type":"User","site_admin":false},"labels":[{"id":323761238,"node_id":"MDU6TGFiZWwzMjM3NjEyMzg=","url":"https://api.github.com/repos/bazelbuild/bazel/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":{"login":"laszlocsomor","id":10532244,"node_id":"MDQ6VXNlcjEwNTMyMjQ0","avatar_url":"https://avatars0.githubusercontent.com/u/10532244?v=4","gravatar_id":"","url":"https://api.github.com/users/laszlocsomor","html_url":"https://github.com/laszlocsomor","followers_url":"https://api.github.com/users/laszlocsomor/followers","following_url":"https://api.github.com/users/laszlocsomor/following{/other_user}","gists_url":"https://api.github.com/users/laszlocsomor/gists{/gist_id}","starred_url":"https://api.github.com/users/laszlocsomor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laszlocsomor/subscriptions","organizations_url":"https://api.github.com/users/laszlocsomor/orgs","repos_url":"https://api.github.com/users/laszlocsomor/repos","events_url":"https://api.github.com/users/laszlocsomor/events{/privacy}","received_events_url":"https://api.github.com/users/laszlocsomor/received_events","type":"User","site_admin":false},"assignees":[{"login":"laszlocsomor","id":10532244,"node_id":"MDQ6VXNlcjEwNTMyMjQ0","avatar_url":"https://avatars0.githubusercontent.com/u/10532244?v=4","gravatar_id":"","url":"https://api.github.com/users/laszlocsomor","html_url":"https://github.com/laszlocsomor","followers_url":"https://api.github.com/users/laszlocsomor/followers","following_url":"https://api.github.com/users/laszlocsomor/following{/other_user}","gists_url":"https://api.github.com/users/laszlocsomor/gists{/gist_id}","starred_url":"https://api.github.com/users/laszlocsomor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laszlocsomor/subscriptions","organizations_url":"https://api.github.com/users/laszlocsomor/orgs","repos_url":"https://api.github.com/users/laszlocsomor/repos","events_url":"https://api.github.com/users/laszlocsomor/events{/privacy}","received_events_url":"https://api.github.com/users/laszlocsomor/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2018-06-27T03:12:25Z","updated_at":"2018-06-29T11:43:51Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bazelbuild/bazel/pulls/5476","html_url":"https://github.com/bazelbuild/bazel/pull/5476","diff_url":"https://github.com/bazelbuild/bazel/pull/5476.diff","patch_url":"https://github.com/bazelbuild/bazel/pull/5476.patch"},"body":"`memcmp(msys_display_name, value, sizeof(msys_display_name)` try to get length of `msys_display_name` with `sizeof`, but `msys_display_name` is declared as `const char*` pointer, so `sizeof` will return the size of pointer (8-bytes) instead of actual length of string. Declare string as `const char msys_display_name[]` will fix this.\r\n\r\nFound by Clang's `-Wsizeof-pointer-memaccess`.\r\n\r\n/cc @dslomov "},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/401330111","html_url":"https://github.com/bazelbuild/bazel/pull/5476#issuecomment-401330111","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5476","id":401330111,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMTMzMDExMQ==","user":{"login":"dslomov","id":5008223,"node_id":"MDQ6VXNlcjUwMDgyMjM=","avatar_url":"https://avatars2.githubusercontent.com/u/5008223?v=4","gravatar_id":"","url":"https://api.github.com/users/dslomov","html_url":"https://github.com/dslomov","followers_url":"https://api.github.com/users/dslomov/followers","following_url":"https://api.github.com/users/dslomov/following{/other_user}","gists_url":"https://api.github.com/users/dslomov/gists{/gist_id}","starred_url":"https://api.github.com/users/dslomov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dslomov/subscriptions","organizations_url":"https://api.github.com/users/dslomov/orgs","repos_url":"https://api.github.com/users/dslomov/repos","events_url":"https://api.github.com/users/dslomov/events{/privacy}","received_events_url":"https://api.github.com/users/dslomov/received_events","type":"User","site_admin":false},"created_at":"2018-06-29T11:43:51Z","updated_at":"2018-06-29T11:43:51Z","author_association":"CONTRIBUTOR","body":"Thanks! Looks like 8 was always enough :)"}}
{"actor":{"display_login":"dslomov"}}