diff options
author | Jim Huang <jim.huang@linaro.org> | 2011-06-16 22:35:16 +0800 |
---|---|---|
committer | Jim Huang <jserv@0xlab.org> | 2011-06-23 11:10:32 +0800 |
commit | e6cff939e603e445c2576958c3777d7b7f5d84fa (patch) | |
tree | 20c05656625ed249d451ef2b730b1c90575a9464 /libc/tzcode | |
parent | 4d9b75a9b08c19cef81b22f889edba61257fb356 (diff) | |
download | bionic-e6cff939e603e445c2576958c3777d7b7f5d84fa.zip bionic-e6cff939e603e445c2576958c3777d7b7f5d84fa.tar.gz bionic-e6cff939e603e445c2576958c3777d7b7f5d84fa.tar.bz2 |
strftime: Use snprintf() instead of sprintf()
Change-Id: I112ac012894eddc96e5f3e77cb87bb300596e3ce
Signed-off-by: Jim Huang <jserv@0xlab.org>
Diffstat (limited to 'libc/tzcode')
-rw-r--r-- | libc/tzcode/strftime.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/tzcode/strftime.c b/libc/tzcode/strftime.c index ab713fb..a2cc3b3 100644 --- a/libc/tzcode/strftime.c +++ b/libc/tzcode/strftime.c @@ -407,9 +407,9 @@ label: tm = *t; mkt = mktime64(&tm); if (TYPE_SIGNED(time64_t)) - (void) sprintf(buf, "%lld", + (void) snprintf(buf, sizeof(buf), "%lld", (long long) mkt); - else (void) sprintf(buf, "%llu", + else (void) snprintf(buf, sizeof(buf), "%llu", (unsigned long long) mkt); pt = _add(buf, pt, ptlim, modifier); } |