bugfix: calloc was misused. Memory corruption.
This dates back to the original copying over from ptp-noposix: 89a46c6d time-wrs/wrs-socket.c: implementation of net functions for wrs arch (but the bug was not in ptp-noposix). It is exposed by the newer compiler (well, library) we are using. But a calloc of 0 bytes should return NULL, to ensure it's not used... Documentation disagrees: If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free(). Signed-off-by: Alessandro Rubini <email@example.com>
Showing with 1 addition and 1 deletion