aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2006-02-15 23:36:50 +0000
committerDimitri Sokolyuk <demon@dim13.org>2006-02-15 23:36:50 +0000
commitdcd43f2632cf1206a704fc5afa1963b62c9fff5d (patch)
treef3496e6bb99e18727194c951d3b31aba2bcdac0e
parent39d036a0ad6a5426e05d9164988bcef0f1d5b961 (diff)
replace sprintf with snprintf
-rw-r--r--lib/update.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/update.c b/lib/update.c
index dfed858..b41f2a7 100644
--- a/lib/update.c
+++ b/lib/update.c
@@ -73,7 +73,7 @@ tgeb_update(struct tm * tm)
if (!(get = calloc(strlen(TGebGET), sizeof(char))))
err(1, "malloc");
- sprintf(get, TGebGET, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
+ snprintf(get, strlen(TGebGET), TGebGET, tm->tm_year + 1900, tm->tm_mon + 1, tm->tm_mday);
if ((send(sockfd, get, strlen(get), 0)) == -1)
err(1, "send");
free(get);