• Alessandro Rubini's avatar
    bugfix: calloc was misused. Memory corruption. · ceb14b1c
    Alessandro Rubini authored
    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's avatarAlessandro Rubini <rubini@gnudd.com>
    ceb14b1c
Name
Last commit
Last update
..
Makefile Loading commit data...
wrs-socket.c Loading commit data...
wrs-time.c Loading commit data...