Lines Matching refs:array
488 char *array = MallocAndMemsetString(10, '1');
490 EXPECT_DEATH(Atoi(array + 11), RightOOBReadMessage(1));
491 EXPECT_DEATH(Atoi(array - 1), LeftOOBReadMessage(1));
493 EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
495 array[9] = '\0';
496 Atoi(array);
497 array[9] = 'a';
498 Atoi(array);
499 Atoi(array + 9);
501 memset(array, ' ', 10);
502 EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
503 array[9] = '-';
504 EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
505 EXPECT_DEATH(Atoi(array + 9), RightOOBReadMessage(0));
506 array[8] = '-';
507 Atoi(array);
508 free(array);
526 char *array = MallocAndMemsetString(3);
528 array[0] = '1';
529 array[1] = '2';
530 array[2] = '3';
532 EXPECT_DEATH(Strtol(array + 3, NULL, 0), RightOOBReadMessage(0));
533 EXPECT_DEATH(Strtol(array - 1, NULL, 0), LeftOOBReadMessage(1));
535 Strtol(array, &endptr, 3);
536 EXPECT_EQ(array + 2, endptr);
537 EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
538 array[2] = 'z';
539 Strtol(array, &endptr, 35);
540 EXPECT_EQ(array + 2, endptr);
541 EXPECT_DEATH(Strtol(array, NULL, 36), RightOOBReadMessage(0));
543 array[2] = '\0';
544 Strtol(array, NULL, 36);
546 Strtol(array - 1, NULL, -1);
547 Strtol(array + 3, NULL, 1);
549 array[0] = array[1] = array[2] = ' ';
550 EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
551 array[2] = '+';
552 EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
553 array[2] = '-';
554 EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
555 array[1] = '+';
556 Strtol(array, NULL, 0);
557 array[1] = array[2] = 'z';
558 Strtol(array, &endptr, 0);
559 EXPECT_EQ(array, endptr);
560 Strtol(array + 2, NULL, 0);
561 EXPECT_EQ(array, endptr);
562 free(array);