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

#include <string.h>

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

  CHK_FAIL_START
  stpcpy(buffer+1, buffer);
  CHK_FAIL_END

  puts(buffer);
  return ret;
}