summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzra Peisach <epeisach@mit.edu>2001-12-11 17:51:58 +0000
committerEzra Peisach <epeisach@mit.edu>2001-12-11 17:51:58 +0000
commitf7836ff4786ccd765a596c619162aa8113029555 (patch)
treeeaa2c83126f058580b813a5513e433dd113a3301
parent571faeb72c219ffd7310b513646050bf929f51cc (diff)
downloadkrb5-f7836ff4786ccd765a596c619162aa8113029555.tar.gz
krb5-f7836ff4786ccd765a596c619162aa8113029555.tar.xz
krb5-f7836ff4786ccd765a596c619162aa8113029555.zip
* kdc_util.c (subrealm, add_to_transited): Unsigned vs. signed int
fixes. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@14064 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r--src/kdc/ChangeLog5
-rw-r--r--src/kdc/kdc_util.c14
2 files changed, 12 insertions, 7 deletions
diff --git a/src/kdc/ChangeLog b/src/kdc/ChangeLog
index b411e1dc9..ed660dea6 100644
--- a/src/kdc/ChangeLog
+++ b/src/kdc/ChangeLog
@@ -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
diff --git a/src/kdc/kdc_util.c b/src/kdc/kdc_util.c
index 5c23e349a..c0c35dad4 100644
--- a/src/kdc/kdc_util.c
+++ b/src/kdc/kdc_util.c
@@ -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));
}
}
}