Files
codeql/cpp/ql/src/Likely Bugs/Memory Management/SuspiciousCallToStrncat.cpp
2018-09-23 16:23:52 -07:00

5 lines
243 B
C++

strncat(dest, src, strlen(dest)); //wrong: should use remaining size of dest
strncat(dest, src, sizeof(dest)); //wrong: should use remaining size of dest.
//Also fails if dest is a pointer and not an array.