diff options
author | Greg Hudson <ghudson@mit.edu> | 2012-08-23 12:58:29 -0400 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2012-08-23 12:59:00 -0400 |
commit | be74d2e7fa486fd7e5cf59b7e845278164cfb76a (patch) | |
tree | 54f9487541705eea08bb5c068e4748c733971988 /src/lib/gssapi/generic/gssapiP_generic.h | |
parent | bbe2600c832bf23c208da30b5f702274bcb08fb1 (diff) | |
download | krb5-be74d2e7fa486fd7e5cf59b7e845278164cfb76a.tar.gz krb5-be74d2e7fa486fd7e5cf59b7e845278164cfb76a.tar.xz krb5-be74d2e7fa486fd7e5cf59b7e845278164cfb76a.zip |
Clean up k5buf_to_gss helper
k5buf_to_gss was used in only one place (generic_gss_oid_to_str),
where we want to include the terminating null byte in the GSS buffer.
Remove that assumption from the helper, and instead explicitly append
the null byte to the buffer before translating.
Diffstat (limited to 'src/lib/gssapi/generic/gssapiP_generic.h')
-rw-r--r-- | src/lib/gssapi/generic/gssapiP_generic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/gssapi/generic/gssapiP_generic.h b/src/lib/gssapi/generic/gssapiP_generic.h index 3fb0c76227..63b7bf4da6 100644 --- a/src/lib/gssapi/generic/gssapiP_generic.h +++ b/src/lib/gssapi/generic/gssapiP_generic.h @@ -277,7 +277,7 @@ k5buf_to_gss(OM_uint32 *minor, { OM_uint32 status = GSS_S_COMPLETE; char *bp = krb5int_buf_data(input_k5buf); - output_buffer->length = krb5int_buf_len(input_k5buf)+1; + output_buffer->length = krb5int_buf_len(input_k5buf); #if defined(_WIN32) || defined(DEBUG_GSSALLOC) if (output_buffer->length > 0) { output_buffer->value = gssalloc_malloc(output_buffer->length); |