buggnokii - Bugs: bug #17971, smsd segfault [fixed] while...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #17971: smsd segfault [fixed] while reading a SIM empty location with Option GT card

Submitted by:  Yves PERREY <kazymodo>
Submitted on:  Wed 11 Oct 2006 11:42:16 AM UTC  
 
Category: libgnokiiSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Pawel Kot <pkot>
Open/Closed: Closed

Fri 15 Dec 2006 10:50:58 PM UTC, comment #3:

Applied. Thank you.

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Sun 15 Oct 2006 11:59:45 AM UTC, comment #2:

Please find attached partial debug output + gdb backtrace full dump I have.
I have to say that the SIM card is swapped from/to Option GT card/Nokia 6310i.
So I don't use a "fresh" empty SIM when doing my tests.

Yves PERREY <kazymodo>
Wed 11 Oct 2006 12:49:47 PM UTC, comment #1:

Could you please show the part of the log causing segfault?

Pawel Kot <pkot>
Project AdministratorIn charge of this item.
Wed 11 Oct 2006 11:42:16 AM UTC, original submission:

smsd crashes with segfault while reading a SIM empty location with an Option GT pcmcia card (Vodafone rebranded).

In common/phones/atgen.c, ReplyGetSMS function, an expected ',' char is not there. strrchr() returns NULL.

The following patch seems to fix the problem.
I am not sure I choose the right return value in this case.

--- atgen.c.orig 2006-10-09 01:55:36.892218976 +0200
+++ atgen.c 2006-10-11 13:28:35.657692864 +0200
@@ -1526,6 +1526,12 @@
if (!data->raw_sms) return GN_ERR_INTERNALERROR;

tmp = strrchr(buf.line2, ',');
+ /* Vodafone/Option GT pcmcia card:
+ segfault when a location is empty.
+ Maybe safer to check a NULL tmp value.
+ */
+ if (tmp == (char *) NULL)
+ return GN_ERR_EMPTYLOCATION;
sms_len = atoi(tmp+1);
if (sms_len == 0)
return GN_ERR_EMPTYLOCATION;

Yves PERREY <kazymodo>

 

Attached Files
file #10976:  debug_gdb-btfull.txt added by kazymodo (14KiB - text/plain - smsd debug output + core dump gdb bt full)
file #10946:  patch.atgen.c added by kazymodo (510B - text/x-csrc - atgen.c patch proposal)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by pkot (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 15 Dec 2006 10:50:58 PM UTCpkotStatusNone=>Fixed
      Assigned toNone=>pkot
      Open/ClosedOpen=>Closed
    Sun 15 Oct 2006 11:59:45 AM UTCkazymodoAttached File-=>Added debug_gdb-btfull.txt, #10976
    Wed 11 Oct 2006 11:42:17 AM UTCkazymodoAttached File-=>Added patch.atgen.c, #10946

    Back to the top


    Powered by Savane 3.1-cleanup1