aboutsummaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
Diffstat (limited to 'libc')
-rw-r--r--libc/tzcode/asctime.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/tzcode/asctime.c b/libc/tzcode/asctime.c
index 152b0db4e..fea24e479 100644
--- a/libc/tzcode/asctime.c
+++ b/libc/tzcode/asctime.c
@@ -103,7 +103,7 @@ asctime_r(register const struct tm *timeptr, char *buf)
/*
** 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,