Lines Matching refs:from_size

189   size_t from_size = Ident(6);  // less than to_size
191 char *from = Ident((char*)malloc(from_size));
195 strcpy(to + to_size - from_size, from);
201 EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBReadMessage(0));
204 from[from_size - 1] = '!';
212 size_t from_size = Ident(6); // less than to_size
215 char *from = Ident((char*)malloc(from_size));
221 strncpy(to, from, from_size);
223 strncpy(to, from + from_size - 1, to_size);
226 EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)),
228 EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)),
230 EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)),
235 EXPECT_DEATH(Ident(strncpy(to + to_size - from_size + 1, from, from_size)),
240 from[from_size - 1] = '!';
242 strncpy(to, from, from_size);
419 size_t from_size = Ident(20);
420 char *from = MallocAndMemsetString(from_size);
421 from[from_size - 1] = '\0';
425 strcat(to + from_size, from + from_size - 2);
428 EXPECT_DEATH(strcat(to - 1, from + from_size - 1), LeftOOBAccessMessage(1));
432 EXPECT_DEATH(strcat(to, from + from_size), RightOOBReadMessage(0));
435 from[from_size - 1] = 'z';
437 from[from_size - 1] = '\0';
440 to[to_size - from_size + 1] = '\0';
454 size_t from_size = Ident(20);
455 char *from = MallocAndMemsetString(from_size);
458 strncat(to, from, from_size);
459 from[from_size - 1] = '\0';
460 strncat(to, from, 2 * from_size);
461 strncat(to, from + from_size - 1, 10);
465 EXPECT_DEATH(strncat(to, from + from_size, 2), RightOOBReadMessage(0));
467 memset(from, 'z', from_size);
471 EXPECT_DEATH(strncat(to, from, from_size + 1), RightOOBReadMessage(0));
474 to[to_size - from_size + 1] = '\0';
475 EXPECT_DEATH(strncat(to, from, from_size - 1), RightOOBWriteMessage(0));
477 strncat(to, from, from_size - 2);