mirror of
https://github.com/opencv/opencv.git
synced 2024-11-29 05:29:54 +08:00
tls: fix access to array (out of bounds)
This commit is contained in:
parent
44f8670719
commit
b8956d0111
@ -1089,9 +1089,10 @@ public:
|
||||
|
||||
for(size_t i = 0; i < threads.size(); i++)
|
||||
{
|
||||
if(threads[i]->slots[slotIdx])
|
||||
std::vector<void*>& thread_slots = threads[i]->slots;
|
||||
if (thread_slots.size() > slotIdx && thread_slots[slotIdx])
|
||||
{
|
||||
dataVec.push_back(threads[i]->slots[slotIdx]);
|
||||
dataVec.push_back(thread_slots[slotIdx]);
|
||||
threads[i]->slots[slotIdx] = 0;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user