walk_rtree.c (krb5_walk_realm_tree): Fix 16bit vs. 32bit error.
authorTheodore Tso <tytso@mit.edu>
Thu, 21 Mar 1996 04:20:14 +0000 (04:20 +0000)
committerTheodore Tso <tytso@mit.edu>
Thu, 21 Mar 1996 04:20:14 +0000 (04:20 +0000)
(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

src/lib/krb5/krb/ChangeLog
src/lib/krb5/krb/get_in_tkt.c
src/lib/krb5/krb/mk_cred.c
src/lib/krb5/krb/walk_rtree.c

index 9fb871daf8750bc124eec1cac92de471312ce623..8ac2c084317cd0ea4def548297281d0327a87ecd 100644 (file)
@@ -1,3 +1,13 @@
+Wed Mar 20 23:00:59 1996  Theodore Y. Ts'o  <tytso@dcl>
+
+       * 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  <epeisach@kangaroo.mit.edu>
 
        * configure.in: Add KRB5_RUN_FLAGS
index 52b4dd813e753ff8fc6b7fa24f3e11b8f00ea5bf..79c41086b98292785620c38a2a87978148952c17 100644 (file)
@@ -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;
index 717272651b67609235d55bf53ad760d136fdc640..11c6a1d3e993fa5612336ff1d2fd8a279269556f 100644 (file)
@@ -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
index 835d899c4361586f183715abca4354f945df5352..f45dede3a099cb70cf7bf9f13aa4776f7be04ae8 100644 (file)
@@ -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);