vJust fail if tm_mon is out of range for now XXXX this is wrong.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18522 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -53,6 +53,10 @@ _der_timegm (struct tm *tm)
|
||||
time_t res = 0;
|
||||
unsigned i;
|
||||
|
||||
/* XXX this is wrong, needs to handle out of months, days, hours, min, sec */
|
||||
if (tm->tm_mon < 0 || tm->tm_mon > 11)
|
||||
return -1;
|
||||
|
||||
for (i = 70; i < tm->tm_year; ++i)
|
||||
res += is_leap(i) ? 366 : 365;
|
||||
|
||||
|
Reference in New Issue
Block a user