Fix mktime(3) and timegm(3) not sanitizing the broken down time.
Found by musl's libc-test.
This commit is contained in:
parent
b75678bcab
commit
fcf412e54c
|
@ -288,5 +288,7 @@ extern "C" time_t timegm(struct tm* tm)
|
|||
ret += (time_t) minute * 60;
|
||||
ret += (time_t) second * 1;
|
||||
|
||||
gmtime_r(&ret, tm);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue