• 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
c++ Loading commit data...
doc Loading commit data...
highlighting Loading commit data...
security-advisories Loading commit data...
.gitignore Loading commit data...
.travis.yml Loading commit data...
CMakeLists.txt Loading commit data...
CONTRIBUTORS Loading commit data...
LICENSE Loading commit data...
README.md Loading commit data...
RELEASE-PROCESS.md Loading commit data...
appveyor.yml Loading commit data...
mega-test-kenton-home.cfg Loading commit data...
mega-test-kenton-work.cfg Loading commit data...
mega-test-quick.cfg Loading commit data...
mega-test.py Loading commit data...
release.sh Loading commit data...
style-guide.md Loading commit data...
super-test.sh Loading commit data...