commit | 8a7f8387b3b95de2ee0c42e34a226a1fcc066896 | [log] [tgz] |
---|---|---|
author | Dan Albert <danalbert@google.com> | Thu Oct 09 00:32:10 2014 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Oct 09 00:32:11 2014 +0000 |
tree | 8bd5664123e19184cb5b90aea57407cc007344ed | |
parent | 72d72d91262fabe6bc169618ef3acb0721441cf0 [diff] | |
parent | ca75f9cdeb57d02108924f0ca4043956039e8eaf [diff] |
Merge "Use snprintf(3) instead of sprintf(3)."
diff --git a/libc/tzcode/asctime.c b/libc/tzcode/asctime.c index 152b0db..fea24e4 100644 --- a/libc/tzcode/asctime.c +++ b/libc/tzcode/asctime.c
@@ -103,7 +103,7 @@ /* ** We avoid using snprintf since it's not available on all systems. */ - (void) sprintf(result, + (void) snprintf(result, sizeof(result), /* Android change: use snprintf. */ ((strlen(year) <= 4) ? ASCTIME_FMT : ASCTIME_FMT_B), wn, mn, timeptr->tm_mday, timeptr->tm_hour,