Hi all-
I am going nuts here trying to figure out why POSE is complaing about
reading directly from an unallocated chunk of memory in this routine:
static Boolean GetPassword()
{
FormPtr frm;
CharPtr fldText;
// if no password exists we don't even need to ask...
if (!PwdExists())
return true;
frm = FrmInitForm(PasswordForm);
FrmSetFocus(frm, FrmGetObjectIndex(frm, PasswordNameField));
DoDialog:
if (FrmDoDialog(frm) == PasswordCancelButton) {
FrmDeleteForm(frm);
return false;
}
fldText = (CharPtr)FldGetTextPtr((FieldPtr)FrmGetObjectPtr(frm,
FrmGetObjectIndex(frm, PasswordNameField)));
if (!fldText)
goto DoDialog;
StrToLower(fldText, fldText);
if ( PwdExists() && !PwdVerify(fldText) ) { // *** crashing
here in a MemMove in PwdVerify() ***
FrmAlert(BadPasswordAlert);
goto DoDialog;
}
FrmDeleteForm(frm);
return true;
}
I've put a breakpoint in before the error and checked in the console to
make sure that there is an allocated chunk in fldText, which theere is.
I've also checked to make sure that it's not corrupted, and it isn't...
I think I'm doing everything cleanly, but I must not be, unless there is a
bug within PwdVerify(). I've tried it on everything from OS 2 to OS 3.1.
Thanks for any help!
Alan Pinstein
Synergy Solutions, Inc.
http://www.synsolutions.com
1-800-210-5293