ray icon indicating copy to clipboard operation
ray copied to clipboard

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

Open dcb314 opened this issue 10 years ago • 2 comments

[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.

dcb314 avatar Dec 13 '14 10:12 dcb314

Is this from a Coverity report ?

sebhtml avatar Dec 13 '14 14:12 sebhtml

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

Cppcheck is available from sourceforge.

dcb314 avatar Dec 13 '14 15:12 dcb314