summaryrefslogtreecommitdiffstats
path: root/libc/tzcode
diff options
context:
space:
mode:
authorJim Huang <jim.huang@linaro.org>2011-06-16 22:35:16 +0800
committerJim Huang <jserv@0xlab.org>2011-06-23 11:10:32 +0800
commite6cff939e603e445c2576958c3777d7b7f5d84fa (patch)
tree20c05656625ed249d451ef2b730b1c90575a9464 /libc/tzcode
parent4d9b75a9b08c19cef81b22f889edba61257fb356 (diff)
downloadbionic-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.c4
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);
}