diff options
author | Simo Sorce <simo@redhat.com> | 2015-01-22 14:26:23 -0500 |
---|---|---|
committer | Simo Sorce <simo@redhat.com> | 2015-01-22 14:54:05 -0500 |
commit | 9da1bc9dec8d228b35ef8639832cddc5e477ddf8 (patch) | |
tree | d2a30d8704a7d003f19a515c6e5dc45d89ba9de9 /proxy/src | |
parent | 3349c5a75225649114173529de180bd6d46a9c6e (diff) | |
download | gss-proxy-9da1bc9dec8d228b35ef8639832cddc5e477ddf8.tar.gz gss-proxy-9da1bc9dec8d228b35ef8639832cddc5e477ddf8.tar.xz gss-proxy-9da1bc9dec8d228b35ef8639832cddc5e477ddf8.zip |
Zero out the outputs of display_name
The mechglue expects the mechanism function to zero them in all cases.
Otherwise on error it will later try to free the output buffer value
which can be an arbitrary pointer. This will cause a segfault or
worse in glibc's free().
Signed-off-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Roland Mainz <rmainz@redhat.com>
Diffstat (limited to 'proxy/src')
-rw-r--r-- | proxy/src/mechglue/gpp_import_and_canon_name.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/proxy/src/mechglue/gpp_import_and_canon_name.c b/proxy/src/mechglue/gpp_import_and_canon_name.c index 727823c..92e6e5d 100644 --- a/proxy/src/mechglue/gpp_import_and_canon_name.c +++ b/proxy/src/mechglue/gpp_import_and_canon_name.c @@ -33,6 +33,11 @@ OM_uint32 gssi_display_name(OM_uint32 *minor_status, struct gpp_name_handle *name; OM_uint32 maj, min = 0; + output_name_buffer->length = 0; + output_name_buffer->value = NULL; + if (output_name_type) + *output_name_type = GSS_C_NO_OID; + GSSI_TRACE(); name = (struct gpp_name_handle *)input_name; |