aboutsummaryrefslogtreecommitdiffstats
path: root/libc/tzcode/strftime.c
diff options
context:
space:
mode:
authorDavid Turner <digit@android.com>2011-06-23 06:04:28 -0700
committerAndroid Code Review <code-review@android.com>2011-06-23 06:04:28 -0700
commitac56f5ca2f4c54ddbd37b033f9465d89542c2cbe (patch)
treef553f28097f0468b9ce6ed647d0c11454715cd15 /libc/tzcode/strftime.c
parent1c0a0381dfb3648ffadef9537ec9383d63d62473 (diff)
parente6cff939e603e445c2576958c3777d7b7f5d84fa (diff)
downloadandroid_bionic-ac56f5ca2f4c54ddbd37b033f9465d89542c2cbe.tar.gz
android_bionic-ac56f5ca2f4c54ddbd37b033f9465d89542c2cbe.tar.bz2
android_bionic-ac56f5ca2f4c54ddbd37b033f9465d89542c2cbe.zip
Merge "strftime: Use snprintf() instead of sprintf()"
Diffstat (limited to 'libc/tzcode/strftime.c')
-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 ab713fb50..a2cc3b3ca 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);
}