[sr-dev] kamailio parse_msg() API crashes when anonymous packet is passed to it

varun pratapsingh varunps2003 at gmail.com
Sat Oct 11 05:19:11 CEST 2014


HI All,

According to Kamailio Devel Guide it is mentioned that pasrse_msg()
fucntion returns 0 if it it parses the sip message finely and >0 if error
occurs.

I pass a anonymous packet to this function (packet which is not sip packet)
then it should return >0 value but the function crashes.

Here is gdb back trace:

#0  0x00000033d8c81261 in strnlen () from /lib64/libc.so.6
#1  0x00000033d8c4526e in vfprintf () from /lib64/libc.so.6
#2  0x00000033d8ce4dd0 in __vsyslog_chk () from /lib64/libc.so.6
#3  0x00000033d8ce5000 in syslog () from /lib64/libc.so.6
#4  0x0000000000624830 in parse_msg (
    buf=0x7f93e0bd8d68
"\373kÇ?V\020r\300m\221\217/\r\n\362\315\354\027\227k\366\200\251\252\367\036\336mã³¹\036\237\361\200\071\200Z\352\315\026\312\060\260`P\277\020\243ɬf;\273EV\"P\262",
<incomplete sequence \366>, len=723, msg=0x7fff7af2c190) at
parser/msg_parser.c:704




Thanks and Regards
Varun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sip-router.org/pipermail/sr-dev/attachments/20141011/9f9d7175/attachment.html>


More information about the sr-dev mailing list