gnokii-users
[Top][All Lists]
Advanced

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

Re: Problem with gnokii 0.6.31git, smsd segmentation fault


From: Jan Derfinak
Subject: Re: Problem with gnokii 0.6.31git, smsd segmentation fault
Date: Mon, 6 Jun 2011 02:38:05 +0200 (CEST)
User-agent: Alpine 2.00 (LNX 1167 2008-08-23)

On Sun, 5 Jun 2011, Daniele Forsi wrote:

> 2011/6/5 Jan Derfinak:
> > On Wed, 1 Jun 2011, Daniele Forsi wrote:
> 
> >> set the reference number on unallocated memory, but maybe instead of
> >> the fix I pushed we should be clearing the memory somewhere in smsd
> >
> > Can you explain what you mean? The code in A_SendSMSMessage clears data,
> 
> I think that d->sms isn't cleared

Yes, I found the code. It is in mysql.c:DB_Look():
do
{
  error = WriteSMS (&sms);
  sleep (1);
}
while ((error == GN_ERR_TIMEOUT || error == GN_ERR_FAILED) && numError++ < 3);

I think that it is not good that gnokii lib modifies gn_sms structure.
So we need submit a copy of gn_sms structure to gn_sms_send() to be safe.

Please try the attached patch and let me know it helped.

Thank you.

Jan

-- 

Attachment: WriteSMS_local.diff
Description: Text Data


reply via email to

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