File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,9 @@ namespace crow
182
182
uint16_t min_queue_idx = 0 ;
183
183
184
184
// TODO improve load balancing
185
- for (uint16_t i = 1 ; i < task_queue_length_pool_.size () && task_queue_length_pool_[min_queue_idx] > 0 ; i++)
185
+ // size_t is used here to avoid the security issue https://codeql.github.com/codeql-query-help/cpp/cpp-comparison-with-wider-type/
186
+ // even though the max value of this can be only uint16_t as capacity is uint16_t.
187
+ for (size_t i = 1 ; i < task_queue_length_pool_.size () && task_queue_length_pool_[min_queue_idx] > 0 ; i++)
186
188
// No need to check other io_services if the current one has no tasks
187
189
{
188
190
if (task_queue_length_pool_[i] < task_queue_length_pool_[min_queue_idx])
You can’t perform that action at this time.
0 commit comments