diff --git a/components/newlib/time.c b/components/newlib/time.c index 22960ab933..4a0bfb01da 100644 --- a/components/newlib/time.c +++ b/components/newlib/time.c @@ -137,6 +137,7 @@ int adjtime(const struct timeval *delta, struct timeval *outdelta) int64_t sec = delta->tv_sec; int64_t usec = delta->tv_usec; if(llabs(sec) > ((INT_MAX / 1000000L) - 1L)) { + errno = EINVAL; return -1; } /*