Index: lsh_pwd.c =================================================================== RCS file: /cvs/pismere/pismere/athena/auth/leash/leashdll/lsh_pwd.c,v retrieving revision 1.49 diff -u -r1.49 lsh_pwd.c --- lsh_pwd.c 23 Nov 2006 00:21:14 -0000 1.49 +++ lsh_pwd.c 24 Nov 2006 19:54:27 -0000 @@ -1548,7 +1548,7 @@ if ((lpdi->size != LSH_DLGINFO_EX_V1_SZ && lpdi->size != LSH_DLGINFO_EX_V2_SZ && - lpdi->size < sizeof(LSH_DLGINFO_EX_V3_SZ)) || + lpdi->size < LSH_DLGINFO_EX_V3_SZ) || lpdi->dlgtype != DLGTYPE_PASSWD) { MessageBox(hDialog, "An incorrect initialization data structure was provided.", @@ -1557,26 +1557,26 @@ return FALSE; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V2_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V2_SZ ) { lpdi->out.username[0] = 0; lpdi->out.realm[0] = 0; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) { lpdi->out.ccache[0] = 0; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) SetWindowText(hDialog, lpdi->in.title); else SetWindowText(hDialog, lpdi->title); SetProp(hDialog, "HANDLES_HELP", (HANDLE)1); - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) lstrcpy(username, lpdi->in.username); else if (lpdi->username) lstrcpy(username, lpdi->username); - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) lstrcpy(realm, lpdi->in.realm); else if (lpdi->realm) lstrcpy(realm, lpdi->realm); @@ -2008,7 +2008,7 @@ Leash_set_default_noaddresses(noaddresses); } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V2_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V2_SZ ) { strncpy(lpdi->out.username, username, LEASH_USERNAME_SZ); lpdi->out.username[LEASH_USERNAME_SZ-1] = 0; strncpy(lpdi->out.realm, realm, LEASH_REALM_SZ); @@ -2069,7 +2069,7 @@ *( (LPLSH_DLGINFO_EX far *)(&lpdi) ) = (LPLSH_DLGINFO_EX)(LPSTR)lParam; - if ((lpdi->size < sizeof(LSH_DLGINFO_EX_V3_SZ) && + if ((lpdi->size < LSH_DLGINFO_EX_V3_SZ && lpdi->size != LSH_DLGINFO_EX_V1_SZ && lpdi->size != LSH_DLGINFO_EX_V2_SZ) || lpdi->dlgtype != DLGTYPE_CHPASSWD) { @@ -2080,26 +2080,26 @@ return FALSE; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V2_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V2_SZ ) { lpdi->out.username[0] = 0; lpdi->out.realm[0] = 0; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) { lpdi->out.ccache[0] = 0; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) SetWindowText(hDialog, lpdi->in.title); else SetWindowText(hDialog, lpdi->title); SetProp(hDialog, "HANDLES_HELP", (HANDLE)1); - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) lstrcpy(username, lpdi->in.username); else if (lpdi->username) lstrcpy(username, lpdi->username); - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ) ) + if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ ) lstrcpy(realm, lpdi->in.realm); else if (lpdi->realm) lstrcpy(realm, lpdi->realm); @@ -2374,7 +2374,7 @@ return TRUE; } - if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V2_SZ) ) { + if ( lpdi->size >= LSH_DLGINFO_EX_V2_SZ ) { strncpy(lpdi->out.username, username, LEASH_USERNAME_SZ); lpdi->out.username[LEASH_USERNAME_SZ-1] = 0; strncpy(lpdi->out.realm, realm, LEASH_REALM_SZ);