[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[libmicrohttpd] 02/03: get_date_str(): added error check
From: |
gnunet |
Subject: |
[libmicrohttpd] 02/03: get_date_str(): added error check |
Date: |
Mon, 30 Aug 2021 19:51:20 +0200 |
This is an automated email from the git hooks/post-receive script.
karlson2k pushed a commit to branch master
in repository libmicrohttpd.
commit 17d8406e6cae2a1be852acd5e6d40e6ce1f5073b
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Mon Aug 30 17:46:48 2021 +0300
get_date_str(): added error check
---
src/microhttpd/connection.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c
index 51574113..bcb3f934 100644
--- a/src/microhttpd/connection.c
+++ b/src/microhttpd/connection.c
@@ -1322,7 +1322,8 @@ get_date_str (char *date)
struct tm *pNow;
#endif
- time (&t);
+ if ((time_t) -1 == time (&t))
+ return false;
#if defined(HAVE_C11_GMTIME_S)
if (NULL == gmtime_s (&t,
&now))
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.