I think there's a missing pair of parentheses in strtoday():
https://github.com/shadow-maint/shadow/blob/master/libmisc/strtoday.c#L76
return (long) (t + DAY / 2) / DAY;
should be
return (long) ((t + DAY / 2) / DAY);
to avoid the intermediate calculations overflowing with a 32-bit long.
(Noted here https://rachelbythebay.com/w/2023/01/26/shadow/)
I think there's a missing pair of parentheses in strtoday():
https://github.com/shadow-maint/shadow/blob/master/libmisc/strtoday.c#L76
should be
to avoid the intermediate calculations overflowing with a 32-bit long.
(Noted here https://rachelbythebay.com/w/2023/01/26/shadow/)