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

Integer overflow #949

Open
scumatteo opened this issue Dec 2, 2024 · 0 comments
Open

Integer overflow #949

scumatteo opened this issue Dec 2, 2024 · 0 comments

Comments

@scumatteo
Copy link

In Optimizer.cc, line 85, you declare

const int nExpectedSize = (vpKFs.size())*vpMP.size();

but when the number of vpKF and vpMP is high for very large explorations, nExpectedSize results in overflow, and the next lines throw exceptions, because you're passing to the reserve method for the vectors a negative value.

Solved by declaring nExpectedSize as unsigned long.

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