mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-19 02:16:34 +08:00
buffer overrun fix
This commit is contained in:
@@ -109,7 +109,7 @@ namespace xobjdetect
|
||||
{
|
||||
//find first non visited index
|
||||
int i = 0;
|
||||
while(visited[i] == true && i<(int)visited.size())
|
||||
while(i<(int)visited.size() && visited[i] == true)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
@@ -123,7 +123,7 @@ namespace xobjdetect
|
||||
{
|
||||
visited[next] = true;
|
||||
int i = 0;
|
||||
while(visited[i] == true && i<(int)visited.size())
|
||||
while(i<(int)visited.size() && visited[i] == true)
|
||||
{
|
||||
i++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user