From 0aac17d9f7c7be5bb2efcf821ec939a181012406 Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Tue, 24 Mar 2020 12:22:26 +0300 Subject: [PATCH] calib3d: check input values in dls --- modules/calib3d/src/dls.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/calib3d/src/dls.cpp b/modules/calib3d/src/dls.cpp index 93c409b030..a0ff0c3e1e 100644 --- a/modules/calib3d/src/dls.cpp +++ b/modules/calib3d/src/dls.cpp @@ -653,6 +653,7 @@ bool dls::is_empty(const cv::Mat * M) bool dls::positive_eigenvalues(const cv::Mat * eigenvalues) { + CV_Assert(eigenvalues && !eigenvalues->empty()); cv::MatConstIterator_ it = eigenvalues->begin(); return *(it) > 0 && *(it+1) > 0 && *(it+2) > 0; }