From b0d87761c93aad441d9d1cd5d01059e9ce5773fb Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 23 Jan 2014 21:46:30 +0100 Subject: BUG: strftime() return value is not checked It's put in the stack so it could be read past end in case of error where the output would remain undefined. --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util.c b/util.c index 0195860..66907c7 100644 --- a/util.c +++ b/util.c @@ -110,7 +110,7 @@ void arpadate(char *buf) now = time(NULL); date = localtime((const time_t *)&now); - strftime(buf,40,format,date); + assert(strftime(buf,40,format,date) > 0); } /** -- 1.7.12.1