From f7eb533f85d0941dbf6edb3081f065e4c010b8cc Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 8 Oct 2018 08:24:14 +0000 Subject: Vendor import apr-1.6.5 --- time/unix/time.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'time/unix') diff --git a/time/unix/time.c b/time/unix/time.c index dfa45e690c629..7f09581927699 100644 --- a/time/unix/time.c +++ b/time/unix/time.c @@ -142,6 +142,9 @@ APR_DECLARE(apr_status_t) apr_time_exp_get(apr_time_t *t, apr_time_exp_t *xt) static const int dayoffset[12] = {306, 337, 0, 31, 61, 92, 122, 153, 184, 214, 245, 275}; + if (xt->tm_mon < 0 || xt->tm_mon >= 12) + return APR_EBADDATE; + /* shift new year to 1st March in order to make leap year calc easy */ if (xt->tm_mon < 2) -- cgit v1.2.3