Check the size argument passed to strncat for common erroneous patterns. There are currently no clang-analyzer-unix.cstring.BadSizeArg warnings in mozilla-central! https://clang-analyzer.llvm.org/available_checks.html MozReview-Commit-ID: DUI3ZNIBoLQ
10 lines
192 B
C++
10 lines
192 B
C++
// https://clang-analyzer.llvm.org/available_checks.html
|
|
|
|
#include "structures.h"
|
|
|
|
void test()
|
|
{
|
|
char dest[3];
|
|
strncat(dest, "***", sizeof(dest)); // warning : potential buffer overflow
|
|
}
|