[26121] in CVS-changelog-for-Kerberos-V5

home help back first fref pref prev next nref lref last post

svn rev #25461: branches/krb5-1-9/src/kadmin/cli/

daemon@ATHENA.MIT.EDU (tlyu@mit.edu)
Tue Nov 8 17:16:49 2011

Date: Tue, 8 Nov 2011 17:16:47 -0500
From: tlyu@mit.edu
Message-Id: <201111082216.pA8MGlVU026705@drugstore.mit.edu>
To: cvs-krb5@mit.edu
Reply-To: krbdev@mit.edu
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Errors-To: cvs-krb5-bounces@mit.edu

http://src.mit.edu/fisheye/changelog/krb5/?cs=25461
Commit By: tlyu
Log Message:
ticket: 7009
subject: Fix month/year units in getdate
version_fixed: 1.9.3
status: resolved

pull up r25444 from trunk

 ------------------------------------------------------------------------
 r25444 | ghudson | 2011-11-06 00:32:34 -0500 (Sun, 06 Nov 2011) | 10 lines

 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   branches/krb5-1-9/src/kadmin/cli/getdate.y
Modified: branches/krb5-1-9/src/kadmin/cli/getdate.y
===================================================================
--- branches/krb5-1-9/src/kadmin/cli/getdate.y	2011-11-08 22:16:43 UTC (rev 25460)
+++ branches/krb5-1-9/src/kadmin/cli/getdate.y	2011-11-08 22:16:47 UTC (rev 25461)
@@ -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) {

_______________________________________________
cvs-krb5 mailing list
cvs-krb5@mit.edu
https://mailman.mit.edu/mailman/listinfo/cvs-krb5

home help back first fref pref prev next nref lref last post