mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
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
1 changed files with 2 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue