From: Theodore Tso Date: Thu, 21 Mar 1996 04:20:14 +0000 (+0000) Subject: walk_rtree.c (krb5_walk_realm_tree): Fix 16bit vs. 32bit error. X-Git-Tag: krb5-1.0-beta6~310 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=28c524985d0e5d8a2753c39ec39b1befed78cdf5;p=krb5.git walk_rtree.c (krb5_walk_realm_tree): Fix 16bit vs. 32bit error. (cap_code should been a krb5_error_code, not an int!) mk_cred.c (krb5_mk_ncred_basic): Fix windows lint flame. get_in_tkt.c (krb5_get_in_tkt): Fix 16bit vs. 32bit error. (do_more should not have been an int!) git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7693 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/krb5/krb/ChangeLog b/src/lib/krb5/krb/ChangeLog index 9fb871daf..8ac2c0843 100644 --- a/src/lib/krb5/krb/ChangeLog +++ b/src/lib/krb5/krb/ChangeLog @@ -1,3 +1,13 @@ +Wed Mar 20 23:00:59 1996 Theodore Y. Ts'o + + * walk_rtree.c (krb5_walk_realm_tree): Fix 16bit vs. 32bit error. + (cap_code should been a krb5_error_code, not an int!) + + * mk_cred.c (krb5_mk_ncred_basic): Fix windows lint flame. + + * get_in_tkt.c (krb5_get_in_tkt): Fix 16bit vs. 32bit error. + (do_more should not have been an int!) + Mon Mar 18 21:49:39 1996 Ezra Peisach * configure.in: Add KRB5_RUN_FLAGS diff --git a/src/lib/krb5/krb/get_in_tkt.c b/src/lib/krb5/krb/get_in_tkt.c index 52b4dd813..79c41086b 100644 --- a/src/lib/krb5/krb/get_in_tkt.c +++ b/src/lib/krb5/krb/get_in_tkt.c @@ -383,7 +383,7 @@ krb5_get_in_tkt(context, options, addrs, ktypes, ptypes, key_proc, keyseed, krb5_kdc_rep * as_reply; krb5_pa_data ** preauth_to_use = 0; int loopcount = 0; - int do_more = 0; + krb5_int32 do_more = 0; if (! krb5_realm_compare(context, creds->client, creds->server)) return KRB5_IN_TKT_REALM_MISMATCH; diff --git a/src/lib/krb5/krb/mk_cred.c b/src/lib/krb5/krb/mk_cred.c index 717272651..11c6a1d3e 100644 --- a/src/lib/krb5/krb/mk_cred.c +++ b/src/lib/krb5/krb/mk_cred.c @@ -120,6 +120,7 @@ krb5_mk_ncred_basic(context, ppcreds, nppcreds, keyblock, { krb5_cred_enc_part credenc; krb5_error_code retval; + size_t size; int i; credenc.magic = KV5M_CRED_ENC_PART; @@ -134,11 +135,11 @@ krb5_mk_ncred_basic(context, ppcreds, nppcreds, keyblock, credenc.timestamp = replaydata->timestamp; /* Get memory for creds and initialize it */ - if ((credenc.ticket_info = (krb5_cred_info **) - malloc((size_t) (sizeof(krb5_cred_info *) * (nppcreds + 1)))) == NULL) { - return ENOMEM; - } - memset(credenc.ticket_info, 0, sizeof(krb5_cred_info *) * (nppcreds + 1)); + size = sizeof(krb5_cred_info *) * (nppcreds + 1); + credenc.ticket_info = (krb5_cred_info **) malloc(size); + if (credenc.ticket_info == NULL) + return ENOMEM; + memset(credenc.ticket_info, 0, size); /* * For each credential in the list, initialize a cred info diff --git a/src/lib/krb5/krb/walk_rtree.c b/src/lib/krb5/krb/walk_rtree.c index 835d899c4..f45dede3a 100644 --- a/src/lib/krb5/krb/walk_rtree.c +++ b/src/lib/krb5/krb/walk_rtree.c @@ -111,7 +111,7 @@ krb5_walk_realm_tree(context, client, server, tree, realm_branch_char) const char *cap_names[4]; char *cap_client, *cap_server; char **cap_nodes; - int cap_code; + krb5_error_code cap_code; if ((cap_client = (char *)malloc(client->length + 1)) == NULL) return ENOMEM; strncpy(cap_client, client->data, client->length);