Re: [dpdk-dev] [PATCH] net/e1000: fix memcpy length error

2017-09-19 Thread Ferruh Yigit
On 9/19/2017 10:16 AM, Ferruh Yigit wrote: > On 9/12/2017 1:44 PM, Yong Wang wrote: >> The size of "flex_filter.filter_info.mask" and "filter->mask" is 16 >> bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char)) >> / sizeof(char)" may reach 128 bytes which may cause array access ou

Re: [dpdk-dev] [PATCH] net/e1000: fix memcpy length error

2017-09-19 Thread Ferruh Yigit
On 9/12/2017 1:44 PM, Yong Wang wrote: > The size of "flex_filter.filter_info.mask" and "filter->mask" is 16 > bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char)) > / sizeof(char)" may reach 128 bytes which may cause array access out > of bound. Fix it by replacing "sizeof(char)"

[dpdk-dev] [PATCH] net/e1000: fix memcpy length error

2017-09-12 Thread Yong Wang
The size of "flex_filter.filter_info.mask" and "filter->mask" is 16 bytes, but the length of memcpy--"RTE_ALIGN(filter->len, sizeof(char)) / sizeof(char)" may reach 128 bytes which may cause array access out of bound. Fix it by replacing "sizeof(char)" by "CHAR_BIT". Signed-off-by: Yong Wang ---