libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 17d8406e6cae2a1be852acd5e6d40e6ce1f5073b
parent 3e6783001198fe51f31a1acbc525f4af62f56540
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Mon, 30 Aug 2021 17:46:48 +0300

get_date_str(): added error check

Diffstat:
Msrc/microhttpd/connection.c | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git 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))