summaryrefslogtreecommitdiffstats
path: root/proxy/src/client/gpm_import_and_canon_name.c
diff options
context:
space:
mode:
authorSimo Sorce <simo@redhat.com>2013-12-27 11:38:10 -0500
committerGünther Deschner <gdeschner@redhat.com>2014-01-15 15:00:03 +0100
commitd78ad1fc906d1e03b8232e4c9aab831899c26b31 (patch)
tree13f51e15986c91ce36c829c3a817ff4a171e7fa6 /proxy/src/client/gpm_import_and_canon_name.c
parenta14cb37d199fec9227f668fe107bf38f99b8b842 (diff)
downloadgss-proxy-d78ad1fc906d1e03b8232e4c9aab831899c26b31.tar.gz
gss-proxy-d78ad1fc906d1e03b8232e4c9aab831899c26b31.tar.xz
gss-proxy-d78ad1fc906d1e03b8232e4c9aab831899c26b31.zip
Add zero termination when the buffer is a string
This shouldn't be needed but apaprently there are a number of applications like mod_auth_kerb that just blindly assume the out buffer returned by gss_diplay_name() is a zero terminated string even though there is no guarantee it is in the API. To avoid annoying misbehavior we forcibly zero terminate strings copied and returned by the interposer. Fixes: https://fedorahosted.org/gss-proxy/ticket/101 Signed-off-by: Simo Sorce <simo@redhat.com> Reviewed-by: Günther Deschner <gdeschner@redhat.com>
Diffstat (limited to 'proxy/src/client/gpm_import_and_canon_name.c')
-rw-r--r--proxy/src/client/gpm_import_and_canon_name.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/proxy/src/client/gpm_import_and_canon_name.c b/proxy/src/client/gpm_import_and_canon_name.c
index 68dc6ce..8e1204b 100644
--- a/proxy/src/client/gpm_import_and_canon_name.c
+++ b/proxy/src/client/gpm_import_and_canon_name.c
@@ -71,7 +71,8 @@ OM_uint32 gpm_display_name(OM_uint32 *minor_status,
output_name->name_type.octet_string_val = NULL;
}
- ret = gp_copy_gssx_to_buffer(&in_name->display_name, output_name_buffer);
+ ret = gp_copy_gssx_to_string_buffer(&in_name->display_name,
+ output_name_buffer);
if (ret) {
ret_min = ret;
ret_maj = GSS_S_FAILURE;