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

Buffer overrun #1

Open
akoerner1 opened this issue Dec 11, 2024 · 0 comments
Open

Buffer overrun #1

akoerner1 opened this issue Dec 11, 2024 · 0 comments

Comments

@akoerner1
Copy link
Contributor

akoerner1 commented Dec 11, 2024

The following line causes a subsequent buffer overrun and segfault:

for( int i = 0; i < time.size(); ++i )

Here are some examples of other potentially problematic loops:

for( int i = 0; i <= num_steps_; ++i )

for( int i = 1; i <= NumberOfControlPoints; ++i )

All loops in the entire project need to be reviewed for indexing issues. C++ is a zero indexing language, the <= operator should be used with care when indexing a loop to prevent buffer overrun.

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