Re: git: ca927128bf6a - stable/13 - When parsing a rule to rotate log files ... MFC

From: Garance A Drosehn <gad_at_FreeBSD.org>
Date: Sat, 23 Sep 2023 22:02:16 UTC
Apologies for the absurdly-long line in that MFC!

The first time I tried the MFC I had modified the commit-log message to 
follow standard conventions, but then it turned out I had the wrong 
ssh-keys in effect so the 'git push' didn't work.

I then redid all the steps for the MFC, this time setting up the correct 
ssh-keys, but then I forgot the '--edit' on the git cherry-pick step.  I 
was expecting the editting to happen on the 'git push' step, and was 
quite surprised to see the commit sail right in there!  "Yay" for using 
the right ssh-keys, but also an "oops...".

> The branch stable/13 has been updated by gad:
>
> URL: 
> https://cgit.FreeBSD.org/src/commit/?id=ca927128bf6a92abce27151fbb1ab112fd2a8385
>
> commit ca927128bf6a92abce27151fbb1ab112fd2a8385
> Author:     Garance A Drosehn <gad@FreeBSD.org>
> AuthorDate: 2021-12-30 20:45:13 +0000
> Commit:     Garance A Drosehn <gad@FreeBSD.org>
> CommitDate: 2023-09-23 21:04:40 +0000
>
>     When parsing a rule to rotate log files on a specific week day,
>     parseDWM() can advance the time to the next week. If the next week 
> is
>     in the next month, then tm_mon is incremented. However, the 
> increment
>     was failing to handle the wraparound from December to January, so 
> when
>     parsing a rule during the last week of the December, the month 
> would
>     advance to month 12. This triggered an out-of-bounds read of the
>     mtab[] array in days_pmonth() after parseDWM() returned.  To fix,
>     this change resets the month to January and increment the year 
> when
>     the month increment wraps.

-- 
Garance Alistair Drosehn                =     drosih@rpi.edu
Lead Developer @rpi                   and    gad@FreeBSD.org
Rensselaer Polytechnic Institute;             Troy, NY;  USA