I wasn't sure who would want to know so I'm putting this message up on the
newsgroup.

In going through the Datebook source code I came across a potential bug in
the source code.  I'll pass it on here.

In the file:
    "Palm OS 3.5 SDK Examples"/Datebook/Src/DateDay.c

you'll find the function DeleteRecord() and on line 550 of that function
you'll find:
    // If the appointment has an alarm, reschedule the next alarm.
    if (apptRec.alarm)

but the memory handle associated with apptRec was unlocked in line 488:
    // Release the appointment record (apptRec is no longer valid)
    MemHandleUnlock (recordH);

meaning that once in a while it is possible that apptRec.alarm might be
overwritten by garbage from another memory allocation or lock.  In that case
if the alarm had been set, but the garbage value happened to be 0, then the
if() statement would be improperly skipped.

If I have somehow misread this code, please let me know.

Greg






-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to