From: Sam Hartman Date: Mon, 26 Jan 2009 20:02:54 +0000 (+0000) Subject: gss_header|trailerlen should be unsigned int X-Git-Tag: krb5-1.7-alpha1~33 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1f7b138d658c0ff543b309531dd8493e6503a913;p=krb5.git gss_header|trailerlen should be unsigned int The krb5_c_crypto_length API returns unsigned int per its design. so, use unsigned int not size_t for its output. ticket: 6351 git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21799 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/lib/gssapi/krb5/k5sealv3iov.c b/src/lib/gssapi/krb5/k5sealv3iov.c index d8542760d..98904b62d 100644 --- a/src/lib/gssapi/krb5/k5sealv3iov.c +++ b/src/lib/gssapi/krb5/k5sealv3iov.c @@ -52,7 +52,7 @@ gss_krb5int_make_seal_token_v3_iov(krb5_context context, unsigned char *tbuf = NULL; int key_usage; size_t rrc = 0; - size_t gss_headerlen, gss_trailerlen; + unsigned int gss_headerlen, gss_trailerlen; krb5_keyblock *key; krb5_cksumtype cksumtype; size_t data_length, assoc_data_length; @@ -130,21 +130,21 @@ gss_krb5int_make_seal_token_v3_iov(krb5_context context, } if (header->type & GSS_IOV_BUFFER_FLAG_ALLOCATE) - code = kg_allocate_iov(header, gss_headerlen); + code = kg_allocate_iov(header, (size_t) gss_headerlen); else if (header->buffer.length < gss_headerlen) code = KRB5_BAD_MSIZE; if (code != 0) goto cleanup; - header->buffer.length = gss_headerlen; + header->buffer.length = (size_t) gss_headerlen; if (trailer != NULL) { if (trailer->type & GSS_IOV_BUFFER_FLAG_ALLOCATE) - code = kg_allocate_iov(trailer, gss_trailerlen); + code = kg_allocate_iov(trailer, (size_t) gss_trailerlen); else if (trailer->buffer.length < gss_trailerlen) code = KRB5_BAD_MSIZE; if (code != 0) goto cleanup; - trailer->buffer.length = gss_trailerlen; + trailer->buffer.length = (size_t) gss_trailerlen; } /* TOK_ID */ @@ -199,21 +199,21 @@ gss_krb5int_make_seal_token_v3_iov(krb5_context context, } if (header->type & GSS_IOV_BUFFER_FLAG_ALLOCATE) - code = kg_allocate_iov(header, gss_headerlen); + code = kg_allocate_iov(header, (size_t) gss_headerlen); else if (header->buffer.length < gss_headerlen) code = KRB5_BAD_MSIZE; if (code != 0) goto cleanup; - header->buffer.length = gss_headerlen; + header->buffer.length = (size_t) gss_headerlen; if (trailer != NULL) { if (trailer->type & GSS_IOV_BUFFER_FLAG_ALLOCATE) - code = kg_allocate_iov(trailer, gss_trailerlen); + code = kg_allocate_iov(trailer, (size_t) gss_trailerlen); else if (trailer->buffer.length < gss_trailerlen) code = KRB5_BAD_MSIZE; if (code != 0) goto cleanup; - trailer->buffer.length = gss_trailerlen; + trailer->buffer.length = (size_t) gss_trailerlen; } /* TOK_ID */