c885cb533e
net_buf_linearize() used to clear the contents of output buffer, just to fill it with data as the next step. The only effect that would have is if less data was written to the output buffer. But it's not reliable for a caller to rely on net_buf_linearize() for that, instead callers should take care to handle any conditions like that themselves. For example, a caller which wants to process the data as zero-terminated string, must reserve a byte for it in the output buffer explicitly (and set it to zero). The only in-tree user which relied on clearing output buffer was wncm14a2a.c. But either had buffer sizes calculated very precisely to always accommodate extra trailing zero byte (without providing code comments about this), or arguably could suffer from buffer overruns (at least if data received from a modem was invalid and filled up all destination buffer, leaving no space for trailing zero). Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
Kconfig | ||
getaddrinfo.c | ||
socket_offload.c | ||
sockets.c | ||
sockets_internal.h | ||
sockets_tls.c |