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

#include <string.h>

int main(int argc, char** argv) {
  char buffer[8] = {0};
  char src[] = {'1', '2', '3', '4', '5', '6', '7', '8', '9', '0'};
  strncat(buffer, src, 5);
  puts(buffer);

#if 0
  CHK_FAIL_START
  strncat(buffer, src, 10);
  CHK_FAIL_END
#endif

  puts(buffer);
  return ret;
}