• Edward Catmur's avatar
    Avoid passing null to memcpy/memcmp/memset · dbc088d1
    Edward Catmur authored
    It is invalid to pass null as a pointer argument to memcpy/memcmp/memset, even if the count argument is zero:
    
    > Where an argument declared as size_t n specifies the length of the array for a
    function, n can have the value zero on a call to that function. Unless explicitly stated
    otherwise in the description of a particular function in this subclause, pointer arguments
    on such a call shall still have valid values [...]
    
    Detected by -fsanitize=nonnull-attribute.
    dbc088d1
Name
Last commit
Last update
..
cmake Loading commit data...
ekam-provider Loading commit data...
m4 Loading commit data...
samples Loading commit data...
src Loading commit data...
CMakeLists.txt Loading commit data...
LICENSE.txt Loading commit data...
Makefile.am Loading commit data...
Makefile.ekam Loading commit data...
README.txt Loading commit data...
afl-fuzz.sh Loading commit data...
capnp-json.pc.in Loading commit data...
capnp-rpc.pc.in Loading commit data...
capnp.pc.in Loading commit data...
configure.ac Loading commit data...
kj-async.pc.in Loading commit data...
kj.pc.in Loading commit data...
regenerate-bootstraps.sh Loading commit data...
setup-autotools.sh Loading commit data...
setup-ekam.sh Loading commit data...