sebhtml / ray

Ray -- Parallel genome assemblies for parallel DNA sequencing
http://denovoassembler.sf.net
Other
65 stars 12 forks source link

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

Open dcb314 opened 9 years ago

dcb314 commented 9 years ago

[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 commented 9 years ago

Is this from a Coverity report ?

dcb314 commented 9 years ago

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

Cppcheck is available from sourceforge.