[PATCH netcat] UDP server with -k sends data to most recent client

2020-09-28 Thread Duncan Roe
This allows e.g. a sequence of clients to have 2-way conversations. Prior to this, server standard input was effectively discarded. -k -l -u -v reports each time a message comes from a different client than that from which the previous message came. Signed-off-by: Duncan Roe ---

[PATCH] : Add safety to nitems(): check that argument is an array

2020-09-28 Thread Alejandro Colomar
'nitems()' calculates the length of an array in number of items. It is safe: if a pointer is passed to the macro (or function, in C++), the compilation is broken due to: - In >= C11: _Static_assert() - In C89, C99: Negative anonymous bitfield - In C++: The template requires an array This patch

Garbage fix for USB_GET_FULL_DESC

2020-09-28 Thread Martin Pieuchot
Copy with uiomove(9) the correct size of the descriptor and not a random value from the stack. This is Coverity CID 1497167. As I understand it there's no security impact as the size is always caped by `ufd_size' however the returned descriptor might be corrupted and this can explain why