Home | History | Annotate | Download | only in TestCases

Lines Matching refs:to

14 void test1(char *to, int to_size, char *from) {
15 // One of arguments points to not allocated memory.
16 char* r = strncat(to + to_size, from, 2);
19 void test2(char *to, int to_size, char *from) {
20 // "to" is not zero-terminated.
21 memset(to, 'z', to_size);
22 char* r = strncat(to, from, 1);
27 char *to = (char*)malloc(to_size);
33 if (!strcmp(argv[1], "test1")) test1(to, to_size, from);
37 if (!strcmp(argv[1], "test2")) test2(to, to_size, from);
41 free(to);