libmicrohttpd

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

commit 6468c2338834fb2835471f12fadbedd63340cd8c
parent 4fe217e364039b152b03a693bad69695bd55e0f3
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date:   Sat, 30 Oct 2021 18:00:03 +0300

get_date_str(): additional check

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

diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c @@ -1392,7 +1392,9 @@ get_date_str (char *date) date[3] = ','; date[4] = ' '; /* Day of the month */ - MHD_uint8_to_str_pad ((uint8_t) now.tm_mday, 2, date + 5, buf_len - 5); + if (2 != MHD_uint8_to_str_pad ((uint8_t) now.tm_mday, 2, + date + 5, buf_len - 5)) + return false; date[7] = ' '; /* Month */ src = mons[now.tm_mon % 12];