gnokii-users
[Top][All Lists]
Advanced

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

Re: smsd and long messages SOLVED


From: Hartmut Benz
Subject: Re: smsd and long messages SOLVED
Date: Fri, 21 Aug 2009 10:49:34 +0200
User-agent: Thunderbird 2.0.0.22 (X11/20090608)

Pawel Kot wrote:
> Hi,
>
> On Fri, Aug 21, 2009 at 10:24, Hartmut Benz<address@hidden> wrote:
>   
>>> I looked into the sources. Have a look at smsd/pq.c
>>> There's a line:
>>> strncpy ((gchar *) sms.user_data[0].u.text, PQgetvalue (res1, i, 2),
>>> GN_SMS_MAX_LENGTH + 1);
>>> Change there GN_SMS_MAX_LENGTH with GN_SMS_LONG_MAX_LENGTH. That should 
>>> make it.
>>>       
>
> Just checked. That should be:
> 10 * GN_SMS_MAX_LENGTH + 1
>
>   
>> I changed it to this (first only the first line, then the second as well):
>>    strncpy ((gchar *) sms.user_data[0].u.text, PQgetvalue (res1, i, 2),
>> GN_SMS_LONG_MAX_LENGTH + 1);
>>    sms.user_data[0].u.text[GN_SMS_LONG_MAX_LENGTH] = '\0';
>>     
> Use the new value here as well.
>   
>> Both terminate with a buffer overflow
>>     
> Are you able to gdb to see in which line it segfaults
>> address@hidden:~/gnokii-0.6.26$ /home/h2o/myg/bin/smsd -u smsd -p smsd -d
>>     
> Using git would help here :)
>
> take care,
>   
Success - with this mod I've got the complete message transferred!

Thank's a lot for the fast and efficient help!

I'll try the newest git version as soon as possible to see if it works
with the 3109 classic without my 'hack' :-)

Take care
    /Hartmut






reply via email to

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