summaryrefslogtreecommitdiffstats
path: root/tools/clang-tidy/test/clang-analyzer-unix.cstring.BadSizeArg.cpp
blob: 124737c3f47dbe81573a1c044a8392f269bc3a58 (plain)
1
2
3
4
5
6
7
8
9
// https://clang-analyzer.llvm.org/available_checks.html

#include "structures.h"

void test()
{
  char dest[3];
  strncat(dest, "***", sizeof(dest)); // warning : potential buffer overflow
}