Skip to content
Commit ef963ae4 authored by Colin Ian King's avatar Colin Ian King Committed by Tony Nguyen
Browse files

ice: Fix potential infinite loop when using u8 loop counter

A for-loop is using a u8 loop counter that is being compared to
a u32 cmp_dcbcfg->numapp to check for the end of the loop. If
cmp_dcbcfg->numapp is larger than 255 then the counter j will wrap
around to zero and hence an infinite loop occurs. Fix this by making
counter j the same type as cmp_dcbcfg->numapp.

Addresses-Coverity: ("Infinite loop")
Fixes: aeac8ce8

 ("ice: Recognize 860 as iSCSI port in CEE mode")
Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Tested-by: default avatarTony Brelinski <tonyx.brelinski@intel.com>
Signed-off-by: default avatarTony Nguyen <anthony.l.nguyen@intel.com>
parent debb9df3
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment