From: John Kohl Date: Fri, 26 Apr 1991 13:37:04 +0000 (+0000) Subject: make sure timestamp and seq # are zero if they're not present X-Git-Tag: krb5-1.0-alpha5~63 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=2604b5bf9f789c0bb00c24794cabf7691c9f4873;p=krb5.git make sure timestamp and seq # are zero if they're not present git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@2038 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/asn.1/prep2kprep.c b/src/lib/krb5/asn.1/prep2kprep.c index 3f5f9ca0f..4ba302ffa 100644 --- a/src/lib/krb5/asn.1/prep2kprep.c +++ b/src/lib/krb5/asn.1/prep2kprep.c @@ -64,6 +64,9 @@ register int *error; return(0); } retval->usec = val->usec; + } else { + retval->timestamp = 0; + retval->usec = 0; } retval->s_address = KRB5_HostAddress2krb5_addr(val->s__address, error); if (!retval->s_address) { @@ -77,6 +80,7 @@ register int *error; } if (val->optionals & opt_KRB5_EncKrbPrivPart_seq__number) { retval->seq_number = val->seq__number; - } + } else + retval->seq_number = 0; return(retval); } diff --git a/src/lib/krb5/asn.1/safe2ksafe.c b/src/lib/krb5/asn.1/safe2ksafe.c index 0b90f375a..17da0f57d 100644 --- a/src/lib/krb5/asn.1/safe2ksafe.c +++ b/src/lib/krb5/asn.1/safe2ksafe.c @@ -63,6 +63,9 @@ register int *error; return(0); } retval->usec = val->safe__body->usec; + } else { + retval->timestamp = 0; + retval->usec = 0; } retval->s_address = KRB5_HostAddress2krb5_addr(val->safe__body->s__address, error); @@ -83,6 +86,7 @@ register int *error; } if (val->safe__body->optionals & opt_KRB5_KRB__SAFE__BODY_seq__number) { retval->seq_number = val->safe__body->seq__number; - } + } else + retval->seq_number = 0; return(retval); }