RE: Bug in wtp_pack_sar_ack
Igor Ivoilov <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
Fix is commited into cvs > -----Original Message----- > From: Aarno Syvanen [mailto:[email protected]] > Sent: Friday, December 13, 2002 11:46 AM > To: [email protected] > Subject: Bug in wtp_pack_sar_ack > Importance: High > > > Hi List, > > in wtp_pack_sar_ack we have following: > > unsigned char cpsn; > sprintf(&cpsn, "%c", psn); > > this does not work, because sprintf tries to add /0 for an end of the > string, and cspn > is only one byte long. > > simply doing: > > unsigned char cpsn; > unsigned char damn[256]; > sprintf(&cpsn, "%c", psn); > > removes segfault, because now sprintf writes /0 to space reserved by > damn. But of > course one wants a real fix. > > aarno > >