summaryrefslogtreecommitdiff
path: root/tests/test_strlen_static_read.c
blob: b1f928d6167a217b29739298f49fa578ab36b402 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#define _GNU_SOURCE
#define _BSD_SOURCE

#include "common.h"

#include <string.h>

int main(int argc, char** argv) {
  char* canary1 = "ABCDEFGHIJKLMNOPQ";
  char buf[] = {'a', 'b', 'c', 'd', '\0'};
  char* canary2 = "ABCDEF";
  strlen(buf);
  puts(buf);
  buf[4] = 'e';

  CHK_FAIL_START
  strlen(buf);
  CHK_FAIL_END

  puts(argv[1]);
  return ret;
}