am 72d72d91: Merge "Replace uses of sprintf(3) with snprintf(3)."

* commit '72d72d91262fabe6bc169618ef3acb0721441cf0':
  Replace uses of sprintf(3) with snprintf(3).
This commit is contained in:
Dan Albert
2014-10-09 00:12:30 +00:00
committed by Android Git Automerger
7 changed files with 68 additions and 94 deletions

View File

@@ -1949,7 +1949,7 @@ _resolv_set_nameservers_for_net(unsigned netid, const char** servers, int numser
hints.ai_family = PF_UNSPEC;
hints.ai_socktype = SOCK_DGRAM; /*dummy*/
hints.ai_flags = AI_NUMERICHOST;
sprintf(sbuf, "%u", NAMESERVER_PORT);
snprintf(sbuf, sizeof(sbuf), "%u", NAMESERVER_PORT);
index = 0;
for (i = 0; i < numservers && i < MAXNS; i++) {