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

Out of bounds memory access #2

Open
lyudalev opened this issue Jun 13, 2023 · 0 comments
Open

Out of bounds memory access #2

lyudalev opened this issue Jun 13, 2023 · 0 comments

Comments

@lyudalev
Copy link

mser/mser.cpp

Line 264 in 7347d00

while (boundaryPixels[priority].empty() && (priority < 256))

The conditions order should be inverted: first check that priority is less than 256, next check that boundaryPixels is empty at this index. That is, "while (priority < 256 && boundaryPixels[priority].empty())". Otherwise, the boundaryPixels is accessed beyond its bounds when the priority reaches 256.

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

1 participant