My data structure is of size LSH_DLGINFO_EX_V2_SZ and I do set the dialog
size field to LSH_DLGINFO_EX_V2_SZ.
The bug is in lsh_pwd.c at the following line (and others like it):
if ( lpdi->size >= sizeof(LSH_DLGINFO_EX_V3_SZ ))
SetWindowText(hDialog, lpdi->in.title);
else
SetWindowText(hDialog, lpdi->title);
sizeof(LSH_DLGINFO_EX_V3_SZ )evaluates to 2 and will always be less than my
lpdi->size (which is set to LSH_DLGINFO_EX_V2_SZ, which in turn evaluates to
304) the fix is to remove the sizeof:
if ( lpdi->size >= LSH_DLGINFO_EX_V3_SZ)
Or check the size of the LSH_DLGINFO_EX structure:
if ( lpdi->size >= sizeof(LSH_DLGINFO_EX))
There are other parts of the code which have the same problem.
Eli Breder
Software Developer
Hummingbird Connectivity, a division of Open Text Corporation
1010 Sherbrooke West, Suite 811
Montreal, Quebec
H3A 2R7
Tel: (514) 281-5551 ext. 231
Fax: (514) 281-9958
eli.breder@hummingbird.com
Show quoted text
>>-----Original Message-----
>>From: 0000-Admin [mailto:daemon@MIT.EDU] On Behalf Of Jeffrey
>>Altman via RT
>>Sent: Friday, November 24, 2006 12:42 PM
>>To: eli.breder@hummingbird.com
>>Subject: Re: [krbdev.mit.edu #4842] KFW 3.1 Beta 4 problem
>>with Leash password dialog
>>
>>
>>As stated in the header file, if you are using
>>LSH_DLGINFO_EX_V3_SZ then the titile and username are no
>>longer passed in the old fields.
>>If you want to use the old fields you should be allocating a
>>data structure or specifying the size as LSH_DLGINFO_EX_V1_SZ.
>>
>>This is not a bug.
>>
>> Eli Breder via RT wrote:
>>> I reported that this patch fixed our problem. While it fixed the
>>> initial problem of the error dialog popping up, it created a new
>>> problem where the dialog title that our code passes via lpdi->title
>>> and the username are not being displayed . I believe that
>>the new code
>>> in lsh_pwd.c should either be comparing against
>>sizeof(LSH_DLGINFO_EX)
>>> or the various LSH_DLGINFO_EX_Vx_SZ #defines and not
>>sizeof(LSH_DLGINFO_EX_Vx_SZ).
>>>
>>> Thank you.
>>>
>>> Eli Breder
>>> Software Developer
>>> Hummingbird Connectivity, a division of Open Text Corporation 1010
>>> Sherbrooke West, Suite 811 Montreal, Quebec H3A 2R7
>>> Tel: (514) 281-5551 ext. 231
>>> Fax: (514) 281-9958
>>>
>>> eli.breder@hummingbird.com
>>>
>>>
>>>
>>>
>>>
>>>>> -----Original Message-----
>>>>> From: 0000-Admin [mailto:daemon@MIT.EDU] On Behalf Of
>>Jeffrey Altman
>>>>> via RT
>>>>> Sent: Thursday, November 23, 2006 8:25 AM
>>>>> To: eli.breder@hummingbird.com
>>>>> Subject: Re: [krbdev.mit.edu #4842] KFW 3.1 Beta 4 problem with
>>>>> Leash password dialog
>>>>>
>>>>>
>>>>> The patch is on the ticket. You can obtain it from there.
>>>>>
>>>>>
https://krbdev.mit.edu/rt/>>>>>
>>>>> ticket 4842
>>>>>
>>>>> Eli Breder via RT wrote:
>>>>>> I received no attachment with this email. Can you please
>>>>> send it again?
>>>>>> Thank you.
>>>