I'll update it in the CVS, but mind you - the AT interface is deprecated and should be avoided - use AT2 instead.
-- Oded Arbel m-Wise mobile solutions [EMAIL PROTECTED] +972-9-9581711 (116) +972-67-340014 ::.. Jim: "All I've been doing is reading this diary wondering how the hell I'm still alive." -- from 'The Basketball Diaries' (1995) > -----Original Message----- > From: Rene Kluwen [mailto:[EMAIL PROTECTED]] > Sent: Thursday, September 19, 2002 4:06 PM > To: [EMAIL PROTECTED] > Subject: Bug report... > > > While browsing through the code a little bit, I found an error in > at_receive_msg() in smsc_at.c. > The function looks like this: > > > /************************************************************* > ************** > *** > * There are messages to read! > */ > int at_receive_msg(SMSCenter *smsc, Msg **msg) { > > *msg = list_consume(smsc->at_received); > if(msg == NULL) /* Chimit: Should be: if (*msg == NULL) */ > goto error; > > return 1; > > error: > return -1; > } > > Hopefully, msg will never be NULL at the time the if-expression is > evaluated. Or we will get a segfault in the line before. > Below is a suggested patch. (sorry, I am in a webmail > interface atm - that > cannot handle attachments). > > > cvs server: Diffing gw/smsc > Index: gw/smsc/smsc_at.c > =================================================================== > RCS file: /home/cvs/gateway/gw/smsc/smsc_at.c,v > retrieving revision 1.1 > diff -u -r1.1 smsc_at.c > --- gw/smsc/smsc_at.c 8 Aug 2002 17:44:38 -0000 1.1 > +++ gw/smsc/smsc_at.c 19 Sep 2002 13:59:09 -0000 > @@ -399,7 +399,7 @@ > int at_receive_msg(SMSCenter *smsc, Msg **msg) { > > *msg = list_consume(smsc->at_received); > - if(msg == NULL) > + if(*msg == NULL) > goto error; > > return 1; > >