gnokii-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nk7110 driver bugs in folders functions.


From: Pawel Kot
Subject: nk7110 driver bugs in folders functions.
Date: Tue, 06 Aug 2002 16:06:07 +0200

Hi,

Look at the following function:
static GSM_Error P7110_GetSMSStatus(GSM_Data *data, GSM_Statemachine *state)
{
        SMS_Folder fld;
[...]
        data->SMSFolder = &fld;
        if (P7110_GetSMSFolderStatus(data, state) != GE_NONE) return 
GE_NOTREADY;
        SEND_MESSAGE_BLOCK(P7110_MSG_FOLDER, 5);
}
This is wrong. fld is statically allocated on the stack and when we leave the 
function
the space is automatically freed, thus the data->SMSFolder shows "somewhere",
but not any interesting thing. if (data->SMSFolder) will return true, but it 
won't
be valid pointer anyway. This is the possible reason of the smsd segfault.

pkot




reply via email to

[Prev in Thread] Current Thread [Next in Thread]