/external/llvm-project/clang/test/Analysis/ |
D | cstring-syntax.c | 20 size_t strlcpy(char *, const char *, size_t); 39 strlcpy(dest, src, sizeof(dest)); in testStrlcpy() 40 strlcpy(dest, src, destlen); in testStrlcpy() 41 strlcpy(dest, src, 10); in testStrlcpy() 42 …strlcpy(dest, src, 20); // expected-warning {{The third argument allows to potentially copy more b… in testStrlcpy() 43 …strlcpy(dest, src, badlen); // expected-warning {{The third argument allows to potentially copy mo… in testStrlcpy() 44 strlcpy(dest, src, ulen); in testStrlcpy() 45 strlcpy(dest + 5, src, 5); in testStrlcpy() 46 …strlcpy(dest + 5, src, 10); // expected-warning {{The third argument allows to potentially copy mo… in testStrlcpy() 47 strlcpy(dest, "aaaaaaaaaaaaaaa", 10); // no-warning in testStrlcpy() [all …]
|
D | bsd-string.c | 10 size_t strlcpy(char *dst, const char *src, size_t n); 17 strlcpy(overlap, overlap + 1, 3); // expected-warning{{Arguments must not be overlapping buffers}} in f1() 23 len = strlcpy(buf, "abcd", sizeof(buf)); // expected-no-warning in f2() 32 strlcpy(dst, src, 5); // expected-warning{{String copy function overflows the destination buffer}} in f3() 36 …strlcpy(NULL, "abcdef", 6); // expected-warning{{Null pointer passed as 1st argument to string cop… in f4() 45 strlcpy(buf, "abc", 3); in f6() 52 return strlcpy(buf, "1234567", 0); // no-crash in f7() 60 len = strlcpy(buf,"123", sizeof(buf)); in f8() 78 len = strlcpy(buf,"123",0); in f8() 89 len = strlcpy(buf,"abba",sizeof(buf)); in f9() [all …]
|
D | cstring-syntax-weird2.c | 9 size_t strlcpy(char *, const char *, void (*)()); 15 strlcpy(dst, src, foo); // no-crash in testWeirdDecls() 16 strlcpy(dst, src, &foo); // no-crash in testWeirdDecls()
|
D | cstring-syntax-weird.c | 9 size_t strlcpy(char *, const char *, int); 17 strlcpy(dst, src, AStrangeWayToSpecifyStringLengthCorrectly); // no-crash in testWeirdDecls() 18 strlcpy(dst, src, AStrangeWayToSpecifyStringLengthIncorrectly); // no-crash // no-warning in testWeirdDecls()
|
/external/llvm-project/clang/test/Sema/ |
D | warn-strlcpycat-size.c | 4 size_t strlcpy (char * restrict dst, const char * restrict src, size_t size); 21 strlcpy(s1, s2, sizeof(s1)); // no warning in f() 22 …strlcpy(s1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be s… in f() 23 …strlcpy(s1, s3, strlen(s3)+1); // expected-warning {{size argument in 'strlcpy' call appears to be… in f() 25 …strlcpy(s4.f1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to b… in f() 26 …strlcpy((*s5)->f2[x], s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appea… in f() 27 …strlcpy(s1+3, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be… in f() 38 …strlcpy(s->x, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to… in flexible_arrays() 46 …strlcpy(z, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to be… in size_1() 54 …strlcpy(z, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to be … in vlas()
|
/external/clang/test/Sema/ |
D | warn-strlcpycat-size.c | 4 size_t strlcpy (char * restrict dst, const char * restrict src, size_t size); 21 strlcpy(s1, s2, sizeof(s1)); // no warning in f() 22 …strlcpy(s1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be s… in f() 23 …strlcpy(s1, s3, strlen(s3)+1); // expected-warning {{size argument in 'strlcpy' call appears to be… in f() 25 …strlcpy(s4.f1, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to b… in f() 26 …strlcpy((*s5)->f2[x], s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appea… in f() 27 …strlcpy(s1+3, s2, sizeof(s2)); // expected-warning {{size argument in 'strlcpy' call appears to be… in f() 38 …strlcpy(s->x, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to… in flexible_arrays() 46 …strlcpy(z, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to be… in size_1() 54 …strlcpy(z, str, sizeof(str)); // expected-warning {{size argument in 'strlcpy' call appears to be … in vlas()
|
/external/libcups/cups/ |
D | ppd-localize.c | 77 strlcpy(group->text, locattr->text, sizeof(group->text)); in ppdLocalize() 83 strlcpy(option->text, locattr->text, sizeof(option->text)); in ppdLocalize() 101 strlcpy(choice->text, locattr->text, sizeof(choice->text)); in ppdLocalize() 122 strlcpy(cparam->text, locattr->text, sizeof(cparam->text)); in ppdLocalize() 134 strlcpy(attr->text, locattr->text, sizeof(attr->text)); in ppdLocalize() 145 strlcpy(attr->text, locattr->text, sizeof(attr->text)); in ppdLocalize() 162 strlcpy(attr->text, locattr->text, sizeof(attr->text)); in ppdLocalize() 287 strlcpy(buffer, _cupsLangString(lang, message), bufsize); in ppdLocalizeIPPReason() 308 strlcpy(buffer, locattr->text, bufsize); in ppdLocalizeIPPReason() 698 strlcpy(ll_CC, "en_US", ll_CC_size); in ppd_ll_CC() [all …]
|
D | http-addr.c | 341 strlcpy(name, addr->un.sun_path, (size_t)namelen); in httpAddrLookup() 352 strlcpy(name, "localhost", (size_t)namelen); in httpAddrLookup() 423 strlcpy(name, host->h_name, (size_t)namelen); in httpAddrLookup() 519 strlcpy(s, addr->un.sun_path, (size_t)slen); in httpAddrString() 521 strlcpy(s, "localhost", (size_t)slen); in httpAddrString() 617 strlcpy(temps, "::", sizeof(temps)); in httpAddrString() 625 strlcpy(sptr, "::", sizeof(temps) - (size_t)(sptr - temps)); in httpAddrString() 638 strlcpy(s, "UNKNOWN", (size_t)slen); in httpAddrString() 804 strlcpy(s, "localhost", (size_t)slen); in httpGetHostname() 806 strlcpy(s, http->hostname, (size_t)slen); in httpGetHostname() [all …]
|
D | ppd.c | 559 strlcpy(ll_CC, "zh_TW.", sizeof(ll_CC)); in _ppdOpen() 560 strlcpy(ll, "zh_", sizeof(ll)); in _ppdOpen() 563 strlcpy(ll, "zh_", sizeof(ll)); /* Any Chinese variant */ in _ppdOpen() 566 strlcpy(ll_CC, "ja", sizeof(ll_CC)); in _ppdOpen() 567 strlcpy(ll, "jp", sizeof(ll)); in _ppdOpen() 571 strlcpy(ll_CC, "nb", sizeof(ll_CC)); in _ppdOpen() 572 strlcpy(ll, "no", sizeof(ll)); in _ppdOpen() 798 strlcpy(option->defchoice, ppd->attrs[j]->value, in _ppdOpen() 804 strlcpy(option->text, _("Media Size"), sizeof(option->text)); in _ppdOpen() 806 strlcpy(option->text, _("Media Type"), sizeof(option->text)); in _ppdOpen() [all …]
|
D | language.c | 184 strlcpy(language, "en", langsize); in _cupsAppleLanguage() 188 strlcpy(language, locale, langsize); in _cupsAppleLanguage() 192 strlcpy(language, locale, langsize); in _cupsAppleLanguage() 213 strlcpy(language, apple_language_locale[i].language, sizeof(language)); in _cupsAppleLanguage() 293 strlcpy(locale, apple_language_locale[i].locale, localesize); in _cupsAppleLocale() 510 strlcpy(charset, "UTF8", sizeof(charset)); in cupsLangGet() 589 strlcpy(locale, ptr, sizeof(locale)); in cupsLangGet() 646 strlcpy(charset, "UTF8", sizeof(charset)); in cupsLangGet() 661 strlcpy(langname, "C", sizeof(langname)); in cupsLangGet() 695 strlcpy(country, "CN", sizeof(country)); in cupsLangGet() [all …]
|
D | usersys.c | 395 strlcpy(cg->server, server, sizeof(cg->server)); in cupsSetServer() 427 strlcpy(cg->servername, "localhost", sizeof(cg->servername)); in cupsSetServer() 429 strlcpy(cg->servername, cg->server, sizeof(cg->servername)); in cupsSetServer() 489 strlcpy(cg->user, user, sizeof(cg->user)); in cupsSetUser() 524 strlcpy(cg->user_agent, user_agent, sizeof(cg->user_agent)); in cupsSetUserAgent() 537 strlcpy(cg->user_agent, "CUPS IPP", sizeof(cg->user_agent)); in cupsSetUserAgent() 546 strlcpy(cg->user_agent, CUPS_MINIMAL " IPP/2.1", sizeof(cg->user_agent)); in cupsSetUserAgent() 599 strlcpy(version, "unknown", sizeof(version)); in cupsSetUserAgent() 1031 strlcpy(cg->user, cc.user, sizeof(cg->user)); in _cupsSetDefaults() 1035 strlcpy(cg->gss_service_name, cc.gss_service_name, sizeof(cg->gss_service_name)); in _cupsSetDefaults() [all …]
|
D | dir.c | 125 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen() 175 strlcpy(dp->entry.filename, entry.cFileName, sizeof(dp->entry.filename)); in cupsDirRead() 316 strlcpy(dp->directory, directory, sizeof(dp->directory)); in cupsDirOpen() 377 strlcpy(dp->entry.filename, entry->d_name, sizeof(dp->entry.filename)); in cupsDirRead()
|
D | testi18n.c | 272 strlcpy(legsrc, legdest, sizeof(legsrc)); in main() 323 strlcpy(legsrc, legdest, sizeof(legsrc)); in main() 369 strlcpy(legsrc, legdest, sizeof(legsrc)); in main() 416 strlcpy(legsrc, legdest, sizeof(legsrc)); in main() 463 strlcpy(legsrc, legdest, sizeof(legsrc)); in main() 509 strlcpy(legsrc, legdest, sizeof(legsrc)); in main()
|
D | ipp-vars.c | 75 strlcpy(temp, src + 5, sizeof(temp)); in _ippVarsExpand() 92 strlcpy(temp, src, sizeof(temp)); in _ippVarsExpand() 100 strlcpy(temp, src + 1, sizeof(temp)); in _ippVarsExpand() 117 strlcpy(dstptr, value, (size_t)(dstend - dstptr + 1)); in _ippVarsExpand()
|
/external/openssh/ |
D | logintest.c | 101 strlcpy(username, pw->pw_name, sizeof(username)); in testAPI() 109 strlcpy(li1->progname, "OpenSSH-logintest", sizeof(li1->progname)); in testAPI() 123 strlcpy(li1->hostname, "localhost", sizeof(li1->hostname)); in testAPI() 144 strlcpy(s_t0, ctime(&t0), sizeof(s_t0)); in testAPI() 146 strlcpy(s_t1, ctime(&t1), sizeof(s_t1)); in testAPI() 155 strlcpy(s_logintime, ctime(&logintime), sizeof(s_logintime)); in testAPI() 171 strlcpy(s_logouttime, ctime(&logouttime), sizeof(s_logouttime)); in testAPI() 186 strlcpy(s_t2, ctime(&t2), sizeof(s_t2)); in testAPI()
|
D | sftp-realpath.c | 90 left_len = strlcpy(left, path + 1, sizeof(left)); in sftp_realpath() 96 strlcpy(resolved, ".", PATH_MAX); in sftp_realpath() 100 left_len = strlcpy(left, path, sizeof(left)); in sftp_realpath() 210 left_len = strlcpy(left, symlink, sizeof(left)); in sftp_realpath()
|
D | loginrec.c | 319 if (strlcpy(li->username, pw->pw_name, sizeof(li->username)) >= in login_get_lastlog() 386 strlcpy(li->username, username, sizeof(li->username)); in login_init_entry() 396 strlcpy(li->hostname, hostname, sizeof(li->hostname)); in login_init_entry() 570 strlcpy(dst, src, dstsize); in line_fullname() 572 strlcpy(dst, "/dev/", dstsize); in line_fullname() 584 strlcpy(dst, src + 5, dstsize); in line_stripname() 586 strlcpy(dst, src, dstsize); in line_stripname() 1230 strlcpy(li->hostname, ut.ut_host, in wtmp_get_entry() 1392 strlcpy(li->hostname, utx.ut_host, in wtmpx_get_entry() 1489 strlcpy(lastlog_file, LASTLOG_FILE, sizeof(lastlog_file)); in lastlog_openseek() [all …]
|
/external/libcups/filter/ |
D | rastertopwg.c | 203 strlcpy(outheader.OutputType, "Automatic", in main() 206 strlcpy(outheader.OutputType, "Graphics", sizeof(outheader.OutputType)); in main() 208 strlcpy(outheader.OutputType, "Photo", sizeof(outheader.OutputType)); in main() 210 strlcpy(outheader.OutputType, "Text", sizeof(outheader.OutputType)); in main() 212 strlcpy(outheader.OutputType, "TextAndGraphics", in main() 238 strlcpy(outheader.cupsRenderingIntent, "Absolute", in main() 241 strlcpy(outheader.cupsRenderingIntent, "Automatic", in main() 244 strlcpy(outheader.cupsRenderingIntent, "Perceptual", in main() 247 strlcpy(outheader.cupsRenderingIntent, "Relative", in main() 250 strlcpy(outheader.cupsRenderingIntent, "RelativeBpc", in main() [all …]
|
/external/libcups/cgi-bin/ |
D | ipp-var.c | 111 strlcpy(name, "printer_state_history", sizeof(name)); in cgiGetAttributes() 332 strlcpy(current_dest, strrchr(attr->values[0].string.text, '/') + 1, in cgiMoveJobs() 860 strlcpy(resource, newresource, sizeof(resource)); in cgiRewriteURL() 902 strlcpy(url, resource, (size_t)urlsize); in cgiRewriteURL() 917 strlcpy(url, uri, (size_t)urlsize); in cgiRewriteURL() 1022 strlcpy(valptr, _("Printer Paused"), remaining); in cgiSetIPPObjectVars() 1024 strlcpy(valptr, _("Printer Added"), remaining); in cgiSetIPPObjectVars() 1026 strlcpy(valptr, _("Printer Modified"), remaining); in cgiSetIPPObjectVars() 1028 strlcpy(valptr, _("Printer Deleted"), remaining); in cgiSetIPPObjectVars() 1030 strlcpy(valptr, _("Job Created"), remaining); in cgiSetIPPObjectVars() [all …]
|
/external/libcups/notifier/ |
D | mailto.c | 121 strlcpy(mailtoReplyTo, temp + 7, sizeof(mailtoReplyTo)); in main() 404 strlcpy(mailtoFrom, server_admin, sizeof(mailtoFrom)); in load_configuration() 409 strlcpy(mailtoSendmail, "/usr/sbin/sendmail", sizeof(mailtoSendmail)); in load_configuration() 449 strlcpy(mailtoCc, value, sizeof(mailtoCc)); in load_configuration() 451 strlcpy(mailtoFrom, value, sizeof(mailtoFrom)); in load_configuration() 454 strlcpy(mailtoSendmail, value, sizeof(mailtoSendmail)); in load_configuration() 460 strlcpy(mailtoSMTPServer, value, sizeof(mailtoSMTPServer)); in load_configuration() 463 strlcpy(mailtoSubject, value, sizeof(mailtoSubject)); in load_configuration() 502 strlcpy(line, mailtoSendmail, sizeof(line)); in pipe_sendmail()
|
/external/google-breakpad/src/client/mac/crash_generation/ |
D | Inspector.h | 67 strlcpy(key, inEntry.key, sizeof(key) ); in KeyValueMessageData() 68 strlcpy(value, inEntry.value, sizeof(value) ); in KeyValueMessageData() 90 strlcpy(minidump_dir_path_, [minidumpDir fileSystemRepresentation], in MinidumpLocation() 100 strlcpy(minidump_id_, next_minidump_id.c_str(), sizeof(minidump_id_)); in MinidumpLocation()
|
/external/libcups/scheduler/ |
D | cups-driverd.cxx | 268 strlcpy(ppd->record.filename, filename, sizeof(ppd->record.filename)); in add_ppd() 269 strlcpy(ppd->record.name, name, sizeof(ppd->record.name)); in add_ppd() 270 strlcpy(ppd->record.languages[0], language, in add_ppd() 272 strlcpy(ppd->record.products[0], product, sizeof(ppd->record.products[0])); in add_ppd() 273 strlcpy(ppd->record.psversions[0], psversion, in add_ppd() 275 strlcpy(ppd->record.make, make, sizeof(ppd->record.make)); in add_ppd() 276 strlcpy(ppd->record.make_and_model, make_and_model, in add_ppd() 278 strlcpy(ppd->record.device_id, device_id, sizeof(ppd->record.device_id)); in add_ppd() 279 strlcpy(ppd->record.scheme, scheme, sizeof(ppd->record.scheme)); in add_ppd() 447 strlcpy(scheme, name, sizeof(scheme)); in cat_ppd() [all …]
|
D | log.c | 148 strlcpy(filename, ServerRoot, sizeof(filename)); in cupsdCheckLogFile() 170 strlcpy(ptr, ServerName, sizeof(filename) - (size_t)(ptr - filename)); in cupsdCheckLogFile() 262 strlcpy(backname, filename, sizeof(backname)); in cupsdCheckLogFile() 407 strlcpy(p->state_message, message, sizeof(p->state_message)); in cupsdLogFCMessage() 415 strlcpy(p->state_message, message, sizeof(p->state_message)); in cupsdLogFCMessage() 521 strlcpy(clientmsg, message, sizeof(clientmsg)); in cupsdLogClient() 579 strlcpy(jobmsg, message, sizeof(jobmsg)); in cupsdLogJob() 791 strlcpy(number, "1", sizeof(number)); in cupsdLogPage() 809 strlcpy(bufptr, job->dest, sizeof(buffer) - (size_t)(bufptr - buffer)); in cupsdLogPage() 819 … strlcpy(bufptr, job->username ? job->username : "-", sizeof(buffer) - (size_t)(bufptr - buffer)); in cupsdLogPage() [all …]
|
/external/mksh/src/ |
D | strlcpy.c | 28 #undef strlcpy 30 strlcpy(char *dst, const char *src, size_t siz) in strlcpy() function
|
/external/tcpdump/ |
D | netdissect.c | 60 strlcpy(errbuf, "Attempting to initialize Winsock failed", in nd_init() 78 strlcpy(errbuf, "", errbuf_size); in nd_init()
|