Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Index out of range in OrganizedConnectedComponentSegmentation #1798

Closed
mtsep opened this issue Jan 16, 2017 · 4 comments
Closed

Index out of range in OrganizedConnectedComponentSegmentation #1798

mtsep opened this issue Jan 16, 2017 · 4 comments

Comments

@mtsep
Copy link
Contributor

mtsep commented Jan 16, 2017

Hi,
I think there is a bug in the bounds checking code in the file organized_connected_component_segmentation.hpp, line 103:

if (x >= 0 && y < int(labels->width) && y >= 0 && y < int(labels->height) && labels->points[index].label == label)
break;

Looks like the code y < int(labels->width) should really be x < int(labels->width).
Current code leads to labels->points[index] crashing when index out of bounds (x too high).

Error encountered in PCL Version 1.7.2, but looks like it is still present in the version 1.8.0

@jspricke
Copy link
Member

Sounds right, can you send a pull request?

@mtsep
Copy link
Contributor Author

mtsep commented Jan 16, 2017

Ok I made a pull request with this bugfix.
Hopefully everything is correct with the fork/branch, since I'm kind of new in GitHub.

@jspricke
Copy link
Member

You need to create the pull request against the pcl repo ;). Also, please add some more comments to the commit.

@mtsep
Copy link
Contributor Author

mtsep commented Jan 16, 2017

Alright, another try :)

Chungzuwalla pushed a commit to Chungzuwalla/pcl that referenced this issue Mar 31, 2017
UnaNancyOwen pushed a commit to UnaNancyOwen/pcl that referenced this issue Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants