Lines Matching refs:myfoo
55 foo myfoo; in TEST_F() local
57 ASSERT_FORTIFY(stpncpy(myfoo.a, "01234567890", copy_amt)); in TEST_F()
61 foo myfoo; in TEST_F() local
62 memset(&myfoo, 0, sizeof(myfoo)); in TEST_F()
63 myfoo.one[0] = 'A'; // not null terminated string in TEST_F()
64 ASSERT_FORTIFY(stpncpy(myfoo.b, myfoo.one, sizeof(myfoo.b))); in TEST_F()
68 foo myfoo; in TEST_F() local
70 ASSERT_FORTIFY(strncpy(myfoo.a, "01234567890", copy_amt)); in TEST_F()
74 foo myfoo; in TEST_F() local
75 memset(&myfoo, 0, sizeof(myfoo)); in TEST_F()
76 myfoo.one[0] = 'A'; // not null terminated string in TEST_F()
77 ASSERT_FORTIFY(strncpy(myfoo.b, myfoo.one, sizeof(myfoo.b))); in TEST_F()
81 foo myfoo; in TEST_F() local
84 ASSERT_FORTIFY(sprintf(myfoo.a, "%s", source_buf)); in TEST_F()
88 foo myfoo; in TEST_F() local
89 ASSERT_FORTIFY(sprintf(myfoo.a, "0123456789")); in TEST_F()
93 foo myfoo; in vsprintf_helper2() local
98 result = vsprintf(myfoo.a, fmt, va); // should crash here in vsprintf_helper2()
112 foo myfoo; in vsnprintf_helper2() local
118 result = vsnprintf(myfoo.a, size, fmt, va); // should crash here in vsnprintf_helper2()
134 foo myfoo; in TEST_F() local
136 ASSERT_FORTIFY(stpcpy(myfoo.empty, src)); in TEST_F()
146 foo myfoo; in TEST_F() local
148 ASSERT_FORTIFY(strcpy(myfoo.empty, src)); in TEST_F()
158 foo myfoo; in TEST_F() local
160 ASSERT_FORTIFY(strcpy(myfoo.empty, src)); in TEST_F()
170 foo myfoo; in TEST_F() local
172 ASSERT_FORTIFY(strcpy(myfoo.one, src)); in TEST_F()
181 foo myfoo; in TEST_F() local
182 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
183 myfoo.b[0] = '\0'; in TEST_F()
184 ASSERT_FORTIFY(printf("%s", strchr(myfoo.a, 'a'))); in TEST_F()
185 ASSERT_FORTIFY(printf("%s", strchr(static_cast<const char*>(myfoo.a), 'a'))); in TEST_F()
193 foo myfoo; in TEST_F() local
194 memcpy(myfoo.a, "0123456789", 10); in TEST_F()
195 memcpy(myfoo.b, "01234", 6); in TEST_F()
196 ASSERT_FORTIFY(printf("%s", strrchr(myfoo.a, 'a'))); in TEST_F()
197 ASSERT_FORTIFY(printf("%s", strrchr(static_cast<const char*>(myfoo.a), 'a'))); in TEST_F()
205 foo myfoo; in TEST_F() local
206 volatile int asize = sizeof(myfoo.a) + 1; in TEST_F()
207 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
208 ASSERT_FORTIFY(printf("%s", static_cast<const char*>(memchr(myfoo.a, 'a', asize)))); in TEST_F()
210 "%s", static_cast<const char*>(memchr(static_cast<const void*>(myfoo.a), 'a', asize)))); in TEST_F()
218 foo myfoo; in TEST_F() local
219 volatile int asize = sizeof(myfoo.a) + 1; in TEST_F()
220 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
221 ASSERT_FORTIFY(printf("%s", static_cast<const char*>(memrchr(myfoo.a, 'a', asize)))); in TEST_F()
223 "%s", static_cast<const char*>(memrchr(static_cast<const void*>(myfoo.a), 'a', asize)))); in TEST_F()
231 foo myfoo; in TEST_F() local
232 strcpy(myfoo.a, "01"); in TEST_F()
233 size_t n = strlen(myfoo.a); in TEST_F()
234 ASSERT_FORTIFY(strlcpy(myfoo.one, myfoo.a, n)); in TEST_F()
242 foo myfoo; in TEST_F() local
243 strcpy(myfoo.a, "01"); in TEST_F()
244 myfoo.one[0] = '\0'; in TEST_F()
245 size_t n = strlen(myfoo.a); in TEST_F()
246 ASSERT_FORTIFY(strlcat(myfoo.one, myfoo.a, n)); in TEST_F()
253 foo myfoo; in TEST_F() local
255 strncpy(myfoo.a, "012345678", n); in TEST_F()
256 ASSERT_FORTIFY(strncat(myfoo.a, "9", n)); in TEST_F()
260 foo myfoo; in TEST_F() local
261 myfoo.a[0] = '\0'; in TEST_F()
263 ASSERT_FORTIFY(strncat(myfoo.a, "0123456789", n)); in TEST_F()
267 foo myfoo; in TEST_F() local
268 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); // unterminated string in TEST_F()
269 myfoo.b[0] = '\0'; in TEST_F()
271 ASSERT_FORTIFY(strncat(myfoo.b, myfoo.a, n)); in TEST_F()
277 foo myfoo; in TEST_F() local
278 myfoo.a[0] = '\0'; in TEST_F()
279 ASSERT_FORTIFY(strcat(myfoo.a, src)); in TEST_F()
283 foo myfoo; in TEST_F() local
284 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); // unterminated string in TEST_F()
285 myfoo.b[0] = '\0'; in TEST_F()
286 ASSERT_FORTIFY(strcat(myfoo.b, myfoo.a)); in TEST_F()
290 foo myfoo; in TEST_F() local
291 strcpy(myfoo.a, "012345678"); in TEST_F()
292 size_t n = strlen(myfoo.a) + 2; in TEST_F()
293 ASSERT_FORTIFY(snprintf(myfoo.b, n, "a%s", myfoo.a)); in TEST_F()
297 foo myfoo; in TEST_F() local
298 memcpy(myfoo.b, "0123456789", sizeof(myfoo.b)); in TEST_F()
300 ASSERT_FORTIFY(bzero(myfoo.b, n)); in TEST_F()