Aquantia / AQtion

Aquantia AQC multigigabit NIC linux driver (atlantic) - development preview
https://www.aquantia.com
85 stars 30 forks source link

Address UBSAN messages reported by kernel #41

Open foxcob opened 2 years ago

foxcob commented 2 years ago

Address UBSAN messages reported by kernel like the following:

UBSAN: array-index-out-of-bounds in ~/AQtion/aq_nic.c:1571:48
[ 1455.064437] index 8 is out of range for type 'aq_vec_s *[8]'

Avoid UB by not dereferencing the array unless the for loop condition is true.