summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:32:26 +0000
committerJeffrey Altman <jaltman@secure-endpoints.com>2007-10-01 05:32:26 +0000
commitfa8664f19eb7bf0cd4fb44704da4de9ac288d014 (patch)
treeb59c7915b7825118c37cbae4f2db99918e924735 /src
parent4a19954fd2ae6e371080ffcb1f6de1f6eac6c5e0 (diff)
downloadkrb5-fa8664f19eb7bf0cd4fb44704da4de9ac288d014.tar.gz
krb5-fa8664f19eb7bf0cd4fb44704da4de9ac288d014.tar.xz
krb5-fa8664f19eb7bf0cd4fb44704da4de9ac288d014.zip
NIM: BUG: APP: notification icon tooltip wrong string
The Network Identity Manager notification icon can display a tooltip when the user hovers the mouse cursor over it. It is currently used to indicate the default identity (if one is found). However, when retrieving the name of the default identity, the size of the buffer was left unspecified. This patch specifies the correct buffer size. The function called with the incorrect buffer size was kcdb_identity_get_name(). That function does not write more than KCDB_IDENT_MAXCCH_NAME characters regardless of the size of the buffer specified, and the buffer that was passed in is allocated to be this size. No buffer overrun was present in the existing code, although the behavior was incorrect. ticket: new git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20034 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/windows/identity/ui/credwnd.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/windows/identity/ui/credwnd.c b/src/windows/identity/ui/credwnd.c
index 5e9740ecdf..5b246806d8 100644
--- a/src/windows/identity/ui/credwnd.c
+++ b/src/windows/identity/ui/credwnd.c
@@ -3603,6 +3603,8 @@ cw_kmq_wm_dispatch(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
cw_update_extents(tbl, TRUE);
InvalidateRect(hwnd, NULL, FALSE);
+ cb = sizeof(idname);
+
if (KHM_SUCCEEDED(kcdb_identity_get_default(&defid)) &&
defid != NULL &&
KHM_SUCCEEDED(kcdb_identity_get_name(defid, idname, &cb)) &&