From: Tom Yu Date: Mon, 1 Oct 2007 23:55:09 +0000 (+0000) Subject: pull up r20034 from trunk X-Git-Tag: krb5-1.6.3-beta2~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=a360c366d73f6a549bd7cb01074559feb2388b5d;p=krb5.git pull up r20034 from trunk r20034@cathode-dark-space: jaltman | 2007-10-01 01:32:26 -0400 ticket: new subject: 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: 5797 version_fixed: 1.6.3 git-svn-id: svn://anonsvn.mit.edu/krb5/branches/krb5-1-6@20075 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/identity/ui/credwnd.c b/src/windows/identity/ui/credwnd.c index 5e9740ecd..5b246806d 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)) &&