* kdc_util.c (subrealm, add_to_transited): Unsigned vs. signed int
authorEzra Peisach <epeisach@mit.edu>
Tue, 11 Dec 2001 17:51:58 +0000 (17:51 +0000)
committerEzra Peisach <epeisach@mit.edu>
Tue, 11 Dec 2001 17:51:58 +0000 (17:51 +0000)
fixes.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14064 dc483132-0cff-0310-8789-dd5450dbe970

src/kdc/ChangeLog
src/kdc/kdc_util.c

index b411e1dc944b8f84c401948d3063dc47c2b744a2..ed660dea6b42013a24df1a063f4480f6a9c8c00c 100644 (file)
@@ -1,3 +1,8 @@
+2001-12-11  Ezra Peisach  <epeisach@mit.edu>
+
+       * kdc_util.c (subrealm, add_to_transited): Unsigned vs. signed int
+       fixes.
+
 2001-10-25  Tom Yu  <tlyu@mit.edu>
 
        * do_as_req.c (process_as_req: Treat SUPPORT_DESMD5 as if it were
index 5c23e349abe596304fa121f7dd14ea7af48a49f4..c0c35dad4617d68ebc2e86de171a51378c75cffe 100644 (file)
@@ -499,7 +499,7 @@ subrealm(r1,r2)
 char   *r1;
 char   *r2;
 {
-    int        l1,l2;
+    size_t l1,l2;
     l1 = strlen(r1);
     l2 = strlen(r2);
     if(l2 <= l1) return(0);
@@ -732,10 +732,10 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server)
        }
         strncat(current, ",", sizeof(current) - 1 - strlen(current));
         if (pl > 0) {
-          strncat(current, realm, pl);
+          strncat(current, realm, (unsigned) pl);
         }
         else {
-          strncat(current, realm+strlen(realm)+pl, -pl);
+          strncat(current, realm+strlen(realm)+pl, (unsigned) (-pl));
         }
       }
 
@@ -758,10 +758,10 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server)
            goto fail;
          }
           if (pl1 > 0) {
-            strncat(current, realm, pl1);
+            strncat(current, realm, (unsigned) pl1);
           }
           else {
-            strncat(current, realm+strlen(realm)+pl1, -pl1);
+            strncat(current, realm+strlen(realm)+pl1, (unsigned) (-pl1));
           }
         }
         else { /* If not a subrealm */
@@ -787,10 +787,10 @@ add_to_transited(tgt_trans, new_trans, tgs, client, server)
         strncat(current,",", sizeof(current) - 1 - strlen(current));
        current[sizeof(current) - 1] = '\0';
         if (pl > 0) {
-          strncat(current, exp, pl);
+          strncat(current, exp, (unsigned) pl);
         }
         else {
-          strncat(current, exp+strlen(exp)+pl, -pl);
+          strncat(current, exp+strlen(exp)+pl, (unsigned)(-pl));
         }
       }
     }