buffer overrun fix

pull/106/head
manuele 10 years ago
parent a9eebb91f9
commit 77116f35db
  1. 4
      modules/xobjdetect/src/waldboost.cpp

@ -109,7 +109,7 @@ namespace xobjdetect
{ {
//find first non visited index //find first non visited index
int i = 0; int i = 0;
while(visited[i] == true && i<(int)visited.size()) while(i<(int)visited.size() && visited[i] == true)
{ {
i++; i++;
} }
@ -123,7 +123,7 @@ namespace xobjdetect
{ {
visited[next] = true; visited[next] = true;
int i = 0; int i = 0;
while(visited[i] == true && i<(int)visited.size()) while(i<(int)visited.size() && visited[i] == true)
{ {
i++; i++;
} }

Loading…
Cancel
Save