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

Read.cpp:48: possible array index out of range #237

Open
dcb314 opened this issue Dec 13, 2014 · 2 comments
Open

Read.cpp:48: possible array index out of range #237

dcb314 opened this issue Dec 13, 2014 · 2 comments

Comments

@dcb314
Copy link

dcb314 commented Dec 13, 2014

[code/SequencesLoader/Read.cpp:48]: (style) Array index 'first' is used before limits check.

Source code is

while(buffer[first]!=SYMBOL_A && buffer[first]!=SYMBOL_T &&buffer[first]!=SYMBOL_C &&buffer[first]!=SYMBOL_G &&first<theLen){

Also

[code/SequencesLoader/BzReader.cpp:80]: (style) Array index 'm_bufferPosition' is used before limits check.
[code/SequencesLoader/BzReader.cpp:161]: (style) Array index 'm_bufferPosition' is used before limits check.

@sebhtml
Copy link
Owner

sebhtml commented Dec 13, 2014

Is this from a Coverity report ?

@dcb314
Copy link
Author

dcb314 commented Dec 13, 2014

No, from cppcheck, a static analyser, similar to Coverity.

Cppcheck is available from sourceforge.

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