Files
esp-idf/components/esp_libc/test_apps
Guillaume Souchere bdf98cf0dd fix(esp_libc): reject out-of-range adjtime() deltas instead of overflowing
The adjtime() wrapper stored the microsecond offset into the 32-bit
`long` timex.offset field without checking for overflow. A large delta
(e.g. 400 days) was computed in 64-bit and silently truncated when
assigned, wrapping into a small value that passed the ~35 minute range
check. adjtime() then returned 0 instead of the expected -1.

Compute the offset in int64_t and reject values that do not fit in the
timex.offset field with EINVAL. Add a regression test for a multi-day delta.

Closes https://github.com/espressif/esp-idf/issues/19051
2026-09-09 07:28:45 +02:00
..