{"action":"opened","issue":{"url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/2368","repository_url":"https://api.github.com/repos/PointCloudLibrary/pcl","labels_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/2368/labels{/name}","comments_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/2368/comments","events_url":"https://api.github.com/repos/PointCloudLibrary/pcl/issues/2368/events","html_url":"https://github.com/PointCloudLibrary/pcl/issues/2368","id":338410116,"node_id":"MDU6SXNzdWUzMzg0MTAxMTY=","number":2368,"title":"PCD read Header int32 overflow causes seg fault for big pcd binary file ","user":{"login":"JD-ETH","id":23099791,"node_id":"MDQ6VXNlcjIzMDk5Nzkx","avatar_url":"https://avatars0.githubusercontent.com/u/23099791?v=4","gravatar_id":"","url":"https://api.github.com/users/JD-ETH","html_url":"https://github.com/JD-ETH","followers_url":"https://api.github.com/users/JD-ETH/followers","following_url":"https://api.github.com/users/JD-ETH/following{/other_user}","gists_url":"https://api.github.com/users/JD-ETH/gists{/gist_id}","starred_url":"https://api.github.com/users/JD-ETH/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JD-ETH/subscriptions","organizations_url":"https://api.github.com/users/JD-ETH/orgs","repos_url":"https://api.github.com/users/JD-ETH/repos","events_url":"https://api.github.com/users/JD-ETH/events{/privacy}","received_events_url":"https://api.github.com/users/JD-ETH/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-05T02:45:49Z","updated_at":"2018-07-05T02:45:49Z","closed_at":null,"author_association":"NONE","body":"<!--- WARNING: This is an issue tracker, please use our mailing list for questions: www.pcl-users.org. -->\r\n\r\n<!--- Provide a general summary of the issue in the Title above -->\r\nWhen a pcd file has size over uint32_t max (4.2G), it is going to cause segfault when using io::loadpcd or io::loadply.\r\n\r\n## Your Environment\r\n<!--- Include as many relevant details about the environment you experienced the bug in -->\r\n* Operating System and version: Ubuntu 16.04 \r\n* Compiler: gcc, c++ 11\r\n* PCL Version: current master\r\n\r\n## Context\r\n[https://github.com/PointCloudLibrary/pcl/blob/master/io/src/pcd_io.cpp#L319](url)\r\nthis line:\r\n```\r\nint nr_points;\r\ncloud.data.resize (nr_points * cloud.point_step);\r\n```\r\nif the multiplication causes int32 to overflow, the data is resized wrong and cause segfault in the conversion to pcl::PointCloud. \r\n\r\n## Expected Behavior\r\nnot segfault\r\n\r\n## Current Behavior\r\noverflow causes memcopy to be less than expected\r\n\r\n## Code to Reproduce\r\nAny Binary file exceeding 4.3 G should do. \r\n\r\n## Possible Solution\r\nchange the nr_points definition to size_t should fix it \r\n"}}
{"actor":{"display_login":"JD-ETH"}}