net/iavf: fix RSS key access out of bound
The array rss_key has size 'vf->vf_res->rss_key_size', the array index
should be less than that.
Cc: stable@dpdk.org
Fixes: 69dd4c3d08
("net/avf: enable queue and device")
Signed-off-by: Haiyue Wang <haiyue.wang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
This commit is contained in:
parent
46c451d905
commit
8ce5678f28
@ -366,7 +366,7 @@ iavf_init_rss(struct iavf_adapter *adapter)
|
||||
/* configure RSS key */
|
||||
if (!rss_conf->rss_key) {
|
||||
/* Calculate the default hash key */
|
||||
for (i = 0; i <= vf->vf_res->rss_key_size; i++)
|
||||
for (i = 0; i < vf->vf_res->rss_key_size; i++)
|
||||
vf->rss_key[i] = (uint8_t)rte_rand();
|
||||
} else
|
||||
rte_memcpy(vf->rss_key, rss_conf->rss_key,
|
||||
|
Loading…
Reference in New Issue
Block a user