> [Severity: High] > This is a pre-existing issue, but does this time_after() comparison > allow bypassing the 1-week hardware limit on 32-bit systems? This is fixed later. > [Severity: Medium] > This is a pre-existing issue, but what happens if the RZN1_RTC_ALW register > is uninitialized and wday is 0? > > Calling fls(0) - 1 would evaluate to -1. If the current time is a Saturday > (tm_now.tm_wday == 6), delta_days evaluates to 0, which bypasses > the if (delta_days) block and leaves tm->tm_wday = -1. > > Since the core function rtc_valid_tm() does not check tm_wday, would this > propagate a bogus alarm date to the caller? This looks worth investigating to me. On RZN1, ALW is default 0.