From 5b2e5ec7902ca4a5b792545df4389b6412b5452c Mon Sep 17 00:00:00 2001 From: Theodore Tso Date: Tue, 4 Oct 1994 21:47:18 +0000 Subject: [PATCH] Don't assume that krb5_timestamp and time_t are the same type git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@4450 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/krb5/asn.1/ChangeLog | 5 +++++ src/lib/krb5/asn.1/asn1_decode_k.c | 10 +++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/lib/krb5/asn.1/ChangeLog b/src/lib/krb5/asn.1/ChangeLog index d4883a35e..9f1f3c681 100644 --- a/src/lib/krb5/asn.1/ChangeLog +++ b/src/lib/krb5/asn.1/ChangeLog @@ -1,3 +1,8 @@ +Tue Oct 4 16:13:45 1994 Theodore Y. Ts'o (tytso@dcl) + + * asn1_decode_k.c (asn1_decode_kerberos_time): Don't assume that + krb5_timestamp and time_t are the same. + Thu Sep 29 14:26:34 1994 Theodore Y. Ts'o (tytso@dcl) * asn1buf.c (asn1buf_remove_octetstring, asn1buf_remove_charstring): diff --git a/src/lib/krb5/asn.1/asn1_decode_k.c b/src/lib/krb5/asn.1/asn1_decode_k.c index 322c66431..b4a928a5a 100644 --- a/src/lib/krb5/asn.1/asn1_decode_k.c +++ b/src/lib/krb5/asn.1/asn1_decode_k.c @@ -115,7 +115,15 @@ asn1_error_code asn1_decode_kerberos_time(DECLARG(asn1buf *, buf), OLDDECLARG(asn1buf *, buf) OLDDECLARG(krb5_timestamp *, val) { - return asn1_decode_generaltime(buf,val); + time_t t; + asn1_error_code retval; + + retval = asn1_decode_generaltime(buf,&t); + if (retval) + return retval; + + *val = t; + return 0; } #define integer_convert(fname,ktype)\ -- 2.26.2