svn rev #25444: trunk/src/kadmin/cli/
ghudson@MIT.EDU
ghudson at MIT.EDU
Sun Nov 6 00:32:35 EDT 2011
http://mv.ezproxy.com.ezproxyberklee.flo.org/fisheye/changelog/krb5/?cs=25444
Commit By: ghudson
Log Message:
ticket: 7003
subject: Fix month/year units in getdate
target_version: 1.10
tags: pullup
getdate strings like "1 month" or "next year" would fail some of the
time, depending on the value of stack garbage, because DSTcorrect()
doesn't set *error on success and RelativeMonth() doesn't initialize
error. Make DSTcorrect() responsible for setting *error in all cases.
Changed Files:
U trunk/src/kadmin/cli/getdate.y
Modified: trunk/src/kadmin/cli/getdate.y
===================================================================
--- trunk/src/kadmin/cli/getdate.y 2011-11-05 19:55:34 UTC (rev 25443)
+++ trunk/src/kadmin/cli/getdate.y 2011-11-06 04:32:34 UTC (rev 25444)
@@ -631,6 +631,7 @@
return -1;
}
FutureDay = (tm->tm_hour + 1) % 24;
+ *error = 0;
return (Future - Start) + (StartDay - FutureDay) * 60L * 60L;
}
@@ -873,7 +874,7 @@
time_t Start;
time_t tod;
time_t delta;
- int error = 0;
+ int error;
yyInput = p;
if (now == NULL) {
More information about the cvs-krb5
mailing list