Lines Matching refs:myfoo

54   foo myfoo;  in TEST_F()  local
56 ASSERT_FORTIFY(stpncpy(myfoo.a, "01234567890", copy_amt)); in TEST_F()
60 foo myfoo; in TEST_F() local
61 memset(&myfoo, 0, sizeof(myfoo)); in TEST_F()
62 myfoo.one[0] = 'A'; // not null terminated string in TEST_F()
63 ASSERT_FORTIFY(stpncpy(myfoo.b, myfoo.one, sizeof(myfoo.b))); in TEST_F()
67 foo myfoo; in TEST_F() local
69 ASSERT_FORTIFY(strncpy(myfoo.a, "01234567890", copy_amt)); in TEST_F()
73 foo myfoo; in TEST_F() local
74 memset(&myfoo, 0, sizeof(myfoo)); in TEST_F()
75 myfoo.one[0] = 'A'; // not null terminated string in TEST_F()
76 ASSERT_FORTIFY(strncpy(myfoo.b, myfoo.one, sizeof(myfoo.b))); in TEST_F()
80 foo myfoo; in TEST_F() local
83 ASSERT_FORTIFY(sprintf(myfoo.a, "%s", source_buf)); in TEST_F()
87 foo myfoo; in TEST_F() local
88 ASSERT_FORTIFY(sprintf(myfoo.a, "0123456789")); in TEST_F()
92 foo myfoo; in vsprintf_helper2() local
97 result = vsprintf(myfoo.a, fmt, va); // should crash here in vsprintf_helper2()
111 foo myfoo; in vsnprintf_helper2() local
117 result = vsnprintf(myfoo.a, size, fmt, va); // should crash here in vsnprintf_helper2()
133 foo myfoo; in TEST_F() local
135 ASSERT_FORTIFY(stpcpy(myfoo.empty, src)); in TEST_F()
145 foo myfoo; in TEST_F() local
147 ASSERT_FORTIFY(strcpy(myfoo.empty, src)); in TEST_F()
157 foo myfoo; in TEST_F() local
159 ASSERT_FORTIFY(strcpy(myfoo.empty, src)); in TEST_F()
169 foo myfoo; in TEST_F() local
171 ASSERT_FORTIFY(strcpy(myfoo.one, src)); in TEST_F()
180 foo myfoo; in TEST_F() local
181 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
182 myfoo.b[0] = '\0'; in TEST_F()
183 ASSERT_FORTIFY(printf("%s", strchr(myfoo.a, 'a'))); in TEST_F()
184 ASSERT_FORTIFY(printf("%s", strchr(static_cast<const char*>(myfoo.a), 'a'))); in TEST_F()
192 foo myfoo; in TEST_F() local
193 memcpy(myfoo.a, "0123456789", 10); in TEST_F()
194 memcpy(myfoo.b, "01234", 6); in TEST_F()
195 ASSERT_FORTIFY(printf("%s", strrchr(myfoo.a, 'a'))); in TEST_F()
196 ASSERT_FORTIFY(printf("%s", strrchr(static_cast<const char*>(myfoo.a), 'a'))); in TEST_F()
204 foo myfoo; in TEST_F() local
205 volatile int asize = sizeof(myfoo.a) + 1; in TEST_F()
206 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
207 ASSERT_FORTIFY(printf("%s", memchr(myfoo.a, 'a', asize))); in TEST_F()
208 ASSERT_FORTIFY(printf("%s", memchr(static_cast<const void*>(myfoo.a), 'a', asize))); in TEST_F()
216 foo myfoo; in TEST_F() local
217 volatile int asize = sizeof(myfoo.a) + 1; in TEST_F()
218 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); in TEST_F()
219 ASSERT_FORTIFY(printf("%s", memrchr(myfoo.a, 'a', asize))); in TEST_F()
220 ASSERT_FORTIFY(printf("%s", memrchr(static_cast<const void*>(myfoo.a), 'a', asize))); in TEST_F()
228 foo myfoo; in TEST_F() local
229 strcpy(myfoo.a, "01"); in TEST_F()
230 size_t n = strlen(myfoo.a); in TEST_F()
231 ASSERT_FORTIFY(strlcpy(myfoo.one, myfoo.a, n)); in TEST_F()
239 foo myfoo; in TEST_F() local
240 strcpy(myfoo.a, "01"); in TEST_F()
241 myfoo.one[0] = '\0'; in TEST_F()
242 size_t n = strlen(myfoo.a); in TEST_F()
243 ASSERT_FORTIFY(strlcat(myfoo.one, myfoo.a, n)); in TEST_F()
250 foo myfoo; in TEST_F() local
252 strncpy(myfoo.a, "012345678", n); in TEST_F()
253 ASSERT_FORTIFY(strncat(myfoo.a, "9", n)); in TEST_F()
257 foo myfoo; in TEST_F() local
258 myfoo.a[0] = '\0'; in TEST_F()
260 ASSERT_FORTIFY(strncat(myfoo.a, "0123456789", n)); in TEST_F()
264 foo myfoo; in TEST_F() local
265 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); // unterminated string in TEST_F()
266 myfoo.b[0] = '\0'; in TEST_F()
268 ASSERT_FORTIFY(strncat(myfoo.b, myfoo.a, n)); in TEST_F()
274 foo myfoo; in TEST_F() local
275 myfoo.a[0] = '\0'; in TEST_F()
276 ASSERT_FORTIFY(strcat(myfoo.a, src)); in TEST_F()
280 foo myfoo; in TEST_F() local
281 memcpy(myfoo.a, "0123456789", sizeof(myfoo.a)); // unterminated string in TEST_F()
282 myfoo.b[0] = '\0'; in TEST_F()
283 ASSERT_FORTIFY(strcat(myfoo.b, myfoo.a)); in TEST_F()
287 foo myfoo; in TEST_F() local
288 strcpy(myfoo.a, "012345678"); in TEST_F()
289 size_t n = strlen(myfoo.a) + 2; in TEST_F()
290 ASSERT_FORTIFY(snprintf(myfoo.b, n, "a%s", myfoo.a)); in TEST_F()
294 foo myfoo; in TEST_F() local
295 memcpy(myfoo.b, "0123456789", sizeof(myfoo.b)); in TEST_F()
297 ASSERT_FORTIFY(bzero(myfoo.b, n)); in TEST_F()