[Intel-wired-lan] [PATCH] i40e: Use correct buffer size

Kunwu Chan chentao at kylinos.cn
Wed Nov 15 03:10:14 UTC 2023


Hi Simon,
Thank you very much for taking the valuable time to point out my 
problems and shortcomings in detail.
It's my  bad.I misinterpreted 'IFALIASZ' in 'include/uapi/linux/if.h' as 
'IFNAMSIZ'. This led me to think that 'IFNAMSIZ' could be up to 256. 
Sorry again for the trouble.
Yes, it is good code to dynamically calculate the size of the parts that 
make up the 'buffer' and add them up to the size of the whole 'buffer', 
I got lazy because I saw that the other parts had a lot of fixed 'buffer 
size'. I will immediately modify the patch according to your detailed 
suggestions.
 From the code analysis, this place should have a 'snprintf truncation' 
problem, but the impact may not be very big, I found the potential 
problem during the compilation process, after changing the buffer size, 
recompilation will not alarm.
I'll follow your detailed suggestions and remove the 'Fixes' tag and add 
'iwl-next' to the subject.
Thank you again for your reply and guidance.

在 2023/11/13 17:31, Simon Horman 写道:
> [PATCH iwl-next]


More information about the Intel-wired-lan mailing list