[sr-dev] [kamailio/kamailio] ims: fix a crash with contact parsing (PR #3032)

alexyosifov notifications at github.com
Thu Feb 17 10:02:09 CET 2022


Thank you for your contribution!
What I see from the changes you explicitly set ptr->parsed = NULL. If you check the func "int parse_contact(struct hdr_field* _h)" there is a memory allocation for the contact body:
`row 76: 	b = (contact_body_t*)pkg_malloc(sizeof(contact_body_t));
`
It is possible to lead to a memory leak. I have suspicions that the old code works fine, but the problem, in general, is somewhere else. Maybe where the parsed contact is stored before in-dialog replies or where parsed contact is freed but not set to NULL/0.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/pull/3032#issuecomment-1042717843
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/pull/3032/c1042717843 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220217/719ba295/attachment.htm>


More information about the sr-dev mailing list