• Home
  • Raw
  • Download

Lines Matching refs:from

153   char *from = Ident((char*)malloc(from_size));  in TEST()  local
155 strcpy(from, "hello"); in TEST()
156 strcpy(to, from); in TEST()
157 strcpy(to + to_size - from_size, from); in TEST()
159 EXPECT_DEATH(Ident(strcpy(from, "hello2")), RightOOBWriteMessage(0)); in TEST()
161 EXPECT_DEATH(Ident(strcpy(to - 1, from)), LeftOOBWriteMessage(1)); in TEST()
162 EXPECT_DEATH(Ident(strcpy(to, from - 1)), LeftOOBReadMessage(1)); in TEST()
163 EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBReadMessage(0)); in TEST()
164 EXPECT_DEATH(Ident(strcpy(to + to_size, from)), RightOOBWriteMessage(0)); in TEST()
166 from[from_size - 1] = '!'; in TEST()
167 EXPECT_DEATH(Ident(strcpy(to, from)), RightOOBReadMessage(0)); in TEST()
169 free(from); in TEST()
177 char *from = Ident((char*)malloc(from_size)); in TEST() local
178 strcpy(from, "hello"); in TEST()
180 strncpy(to, from, 0); in TEST()
181 strncpy(to - 1, from - 1, 0); in TEST()
183 strncpy(to, from, from_size); in TEST()
184 strncpy(to, from, to_size); in TEST()
185 strncpy(to, from + from_size - 1, to_size); in TEST()
186 strncpy(to + to_size - 1, from, 1); in TEST()
188 EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)), in TEST()
190 EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)), in TEST()
192 EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)), in TEST()
194 EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)), in TEST()
197 EXPECT_DEATH(Ident(strncpy(to + to_size - from_size + 1, from, from_size)), in TEST()
199 EXPECT_DEATH(Ident(strncpy(to + 1, from, to_size)), in TEST()
202 from[from_size - 1] = '!'; in TEST()
204 strncpy(to, from, from_size); in TEST()
206 EXPECT_DEATH(Ident(strncpy(to, from, to_size)), in TEST()
209 free(from); in TEST()
382 char *from = MallocAndMemsetString(from_size); in TEST() local
383 from[from_size - 1] = '\0'; in TEST()
385 strcat(to, from); in TEST()
386 strcat(to, from); in TEST()
387 strcat(to + from_size, from + from_size - 2); in TEST()
390 EXPECT_DEATH(strcat(to - 1, from + from_size - 1), LeftOOBAccessMessage(1)); in TEST()
392 EXPECT_DEATH(strcat(to - 1, from), LeftOOBAccessMessage(1)); in TEST()
393 EXPECT_DEATH(strcat(to, from - 1), LeftOOBReadMessage(1)); in TEST()
394 EXPECT_DEATH(strcat(to, from + from_size), RightOOBReadMessage(0)); in TEST()
397 from[from_size - 1] = 'z'; in TEST()
398 EXPECT_DEATH(strcat(to, from), RightOOBReadMessage(0)); in TEST()
399 from[from_size - 1] = '\0'; in TEST()
403 EXPECT_DEATH(strcat(to, from), RightOOBWriteMessage(0)); in TEST()
405 strcat(to, from + 1); in TEST()
408 free(from); in TEST()
417 char *from = MallocAndMemsetString(from_size); in TEST() local
419 strncat(to, from, 0); in TEST()
420 strncat(to, from, from_size); in TEST()
421 from[from_size - 1] = '\0'; in TEST()
422 strncat(to, from, 2 * from_size); in TEST()
424 EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBAccessMessage(1)); in TEST()
425 strncat(to, from + from_size - 1, 10); in TEST()
427 EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBAccessMessage(1)); in TEST()
428 EXPECT_DEATH(strncat(to, from - 1, 2), LeftOOBReadMessage(1)); in TEST()
429 EXPECT_DEATH(strncat(to, from + from_size, 2), RightOOBReadMessage(0)); in TEST()
431 memset(from, 'z', from_size); in TEST()
435 EXPECT_DEATH(strncat(to, from, from_size + 1), RightOOBReadMessage(0)); in TEST()
439 EXPECT_DEATH(strncat(to, from, from_size - 1), RightOOBWriteMessage(0)); in TEST()
441 strncat(to, from, from_size - 2); in TEST()
444 free(from); in TEST()