diff options
author | Luke Howard <lukeh@padl.com> | 2010-05-08 17:01:11 +0000 |
---|---|---|
committer | Luke Howard <lukeh@padl.com> | 2010-05-08 17:01:11 +0000 |
commit | 46fbbec271cf3eb5a678cc36829c29e9ac3420bb (patch) | |
tree | 98406551cd51dd5fba75aceec77baf6e46335880 | |
parent | b7114bb702c74dc88b7d60c49b58f3f5af703c2d (diff) | |
download | krb5-46fbbec271cf3eb5a678cc36829c29e9ac3420bb.zip krb5-46fbbec271cf3eb5a678cc36829c29e9ac3420bb.tar.gz krb5-46fbbec271cf3eb5a678cc36829c29e9ac3420bb.tar.bz2 |
fix some uninitialised, logic errors
git-svn-id: svn://anonsvn.mit.edu/krb5/users/lhoward/signedpath-naming-exts@23980 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb5/krb/s4u_authdata.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/krb5/krb/s4u_authdata.c b/src/lib/krb5/krb/s4u_authdata.c index 56261bf..6a036ad 100644 --- a/src/lib/krb5/krb/s4u_authdata.c +++ b/src/lib/krb5/krb/s4u_authdata.c @@ -426,7 +426,7 @@ s4u2proxy_size(krb5_context kcontext, size_t *sizep) { struct s4u2proxy_context *s4uctx = (struct s4u2proxy_context *)request_context; - krb5_error_code code; + krb5_error_code code = 0; int i; *sizep += sizeof(krb5_int32); /* version */ @@ -453,7 +453,7 @@ s4u2proxy_externalize(krb5_context kcontext, size_t *lenremain) { struct s4u2proxy_context *s4uctx = (struct s4u2proxy_context *)request_context; - krb5_error_code code; + krb5_error_code code = 0; size_t required = 0; krb5_octet *bp; size_t remain; @@ -465,7 +465,7 @@ s4u2proxy_externalize(krb5_context kcontext, s4u2proxy_size(kcontext, context, plugin_context, request_context, &required); - if (required <= remain) + if (required > remain) return ENOMEM; krb5_ser_pack_int32(1, &bp, &remain); /* version */ @@ -521,7 +521,7 @@ s4u2proxy_internalize(krb5_context kcontext, if (code != 0) goto cleanup; - if (count > 65536) + if (count > 65535) return ERANGE; /* let's set some reasonable limits here */ else if (count > 0) { int i; |