summaryrefslogtreecommitdiff
path: root/tests/test_strncpy_overwrite_over.c
blob: 94b6d2bf5aaab24d4d6534532a4bd2309cffed03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include "common.h"

#include <string.h>

int main(int argc, char** argv) {
#if 0
  char buffer[9] = {'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', '\0'};
  puts(buffer);

  CHK_FAIL_START
  strncpy(buffer+1, buffer, 5);
  CHK_FAIL_END

  puts(buffer);
#endif
  return ret;
}