From dcd43f2632cf1206a704fc5afa1963b62c9fff5d Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 15 Feb 2006 23:36:50 +0000 Subject: replace sprintf with snprintf --- lib/update.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- cgit v1.2.3