[Top][All Lists]

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

Re: possible bug

From: Daniele Forsi
Subject: Re: possible bug
Date: Thu, 13 Dec 2012 12:50:20 +0100

2012/12/12 Jon Berg:

> Is there any way you can suggest a quick and dirty fix that I can
> apply to the source code?
> So that it does not crash. Its not even important that the message returned.

dirty fix (with the frame taken from your output it returns the
correct date, phone number, etc., but the message looks empty):

diff --git a/common/gsm-sms.c b/common/gsm-sms.c
index 77ab16d..0242798 100644
--- a/common/gsm-sms.c
+++ b/common/gsm-sms.c
@@ -564,6 +564,8 @@ static gn_error sms_udh_decode(unsigned char
*message, gn_sms_udh *udh)
                length -= (udh_length + 2);
                pos += (udh_length + 2);
+               if (nr == GN_SMS_UDH_MAX_NUMBER)
+                       break;
        udh->number = nr;

> you said:
> "strange is that
> the code to handle that kind of frame doesn't seem to have changed
> much since 2002"
> Does that mean that you are reluctant to make any changes. And you suspect
> my device is bad?

no, I mean that I'm surprised that it didn't happen sooner
when I looked I didn't see anything crearly wrong but I'll look again

Daniele Forsi

reply via email to

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