[Top][All Lists]

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

Re: Segfault in xgnokii

From: Markus Plail
Subject: Re: Segfault in xgnokii
Date: Thu, 05 Dec 2002 09:20:39 +0100
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu)

* Pawel Kot writes:
>On Wed, 4 Dec 2002, Ulrich Hopp wrote:

>Again a good catch. :-)

>>xgnokii_contacts.c line 427 :

>>It seems that structure entry is not initialized here ( debugger says
>>entry = 0x0 )
>>After changing entry->.....  to ((EditEntry_Data *) Data )
>>pbEntry->..... the segfault disappeared but I don't know if I'm right.
>>Or should entry be initialized here ?

>The code is quite messy there. I spent a couple of minutes analising
>this function. And found one more issue there: an extented phonebook is
>not handled correctly in case of writing to the phone memory, being in
>the phone memory -- anyone to confirm with xgnokii?

>And IMHO entry should be initialized. To be safe we can do this on
>       PhonebookEntry *entry = ((EditEntryData *) data)->pbEntry;

>And then just use entry instead these long string. And we can replace
>'((EditEntryData *) data)->pbEntry' with 'entry' in few places.

>Markus, would you mind to take care of this?

Here's a apatch. Not really tested as I don't have much time today. It
should make the code a bit cleaner.


Attachment: xgnokii_saving_contacts.patch
Description: Text Data

reply via email to

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