Re: [PATCH v1] eal/linux: fix memory illegal accesses

2022-02-27 Thread Thomas Monjalon
23/02/2022 12:26, Ferruh Yigit: > On 2/23/2022 8:49 AM, Steve Yang wrote: > > 'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. > > But as coverity warns 'recv()' doesn't guarantee that 'buf' is > > null-terminated, but 'strlcpy()' requires it. > > > > Enlarge 'buf' size t

Re: [PATCH v1] eal/linux: fix memory illegal accesses

2022-02-23 Thread Ferruh Yigit
On 2/23/2022 8:49 AM, Steve Yang wrote: 'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. But as coverity warns 'recv()' doesn't guarantee that 'buf' is null-terminated, but 'strlcpy()' requires it. Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can

[PATCH v1] eal/linux: fix memory illegal accesses

2022-02-23 Thread Steve Yang
'recv()' fills the 'buf', later 'strlcpy()' used to copy from this buffer. But as coverity warns 'recv()' doesn't guarantee that 'buf' is null-terminated, but 'strlcpy()' requires it. Enlarge 'buf' size to 'EAL_UEV_MSG_LEN + 1' and ensure the last one can be set to 0 when received buffer size is E