From afd989ca9f3415df9807847745e854522866f66f Mon Sep 17 00:00:00 2001
From: Jim Huang <jim.huang@linaro.org>
Date: Thu, 16 Jun 2011 22:35:16 +0800
Subject: [PATCH 1/2] strftime: Use snprintf() instead of sprintf()
Change-Id: I112ac012894eddc96e5f3e77cb87bb300596e3ce
---
libc/tzcode/strftime.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
@@ -407,9 +407,9 @@ label:
tm = *t;
mkt = mktime64(&tm);
if (TYPE_SIGNED(time64_t))
- (void) sprintf(buf, "%lld",
+ (void) snprintf(buf, "%lld", sizeof(buf),
(long long) mkt);
- else (void) sprintf(buf, "%llu",
+ else (void) snprintf(buf, "%llu", sizeof(buf),
(unsigned long long) mkt);
pt = _add(buf, pt, ptlim, modifier);
}
--
1.7.5.4