소스 검색

bugfix for EigValue security check

Alexander Freytag 11 년 전
부모
커밋
379f972793
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/algebra/EigValues.cpp

+ 1 - 1
core/algebra/EigValues.cpp

@@ -33,7 +33,7 @@ EVArnoldi::getEigenvalues ( const GenericMatrix & data, Vector & eigenvalues,
   }
   
   // did we specify more eigenvalues than the matrix can actually have?
-  if ( k <= data.rows() )
+  if ( k > data.rows() )
   {
     throw ( "EVArnoldi: specified k is larger then dimension of matrix! Aborting..." );
   }