Bug in wtp_pack_sar_ack

Aarno Syvänen <[email protected]>
Newsgroups gmane.comp.mobile.kannel.devel
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.