Re: Bug in wtp_pack_sar_ack
Andreas Fink <[email protected]>
| Newsgroups | gmane.comp.mobile.kannel.devel |
|---|---|
| Message-ID | <[email protected]> |
On Freitag, Dezember 13, 2002, at 11:22 Uhr, Bruno Rodrigues wrote: > On Sex, 2002-12-13 at 09:45, Aarno Syvänen wrote: >> Hi List, >> >> in wtp_pack_sar_ack we have following: >> >> unsigned char cpsn; >> sprintf(&cpsn, "%c", psn); > > Isn't this like putting an char (%c) inside a char (cpsn) with the psn > value ? > > like &cpsn = (char) psn; ? no its like cpsn = (unsigned char )psn; but also &cpsn[1] = 0; which is writing to unallocated memory Andreas Fink Fink Consulting GmbH --------------------------------------------------------------- Tel: +41-61-6666332 Fax: +41-61-6666331 Mobile: +41-79-2457333 Address: Clarastrasse 3, 4058 Basel, Switzerland E-Mail: [email protected] Homepage: http://www.finkconsulting.com ---------------------------------------------------------------