Fix mktime(3) and timegm(3) not sanitizing the broken down time.

Found by musl's libc-test.
This commit is contained in:
Jonas 'Sortie' Termansen 2014-08-20 13:32:05 +02:00
parent b75678bcab
commit fcf412e54c
1 changed files with 2 additions and 0 deletions

View File

@ -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;
}