FS-5441: --resolve
fix silence_stream size bug
FS-5434 --resolve
This was writing a null one space to the right, outside of the malloc'd buffer. On further review this uses apr_vsnprintf which always returns null terminated.
read() does not NULL terminate statbuf, but strstr expects statbuf to be null terminated.
Minor typo. User is being passed into this fuction as a long pointer, not a long.
When message events were added, the debug field name was overlooked. This would have only been hit when debug level was above 'DEBUG1' and at that point it would have incorrectly chosen debug display names.
FS-5443: --resolve leaked because the JS api's copy and return new malloc'd pointers.
If the mod_sofia global presense hash is null, then make sure to free the matches variable before going to done.
Alice meet rabit hole. There is a leak here on every invite that comes back from a status 180 when the other side is not FS, but you have presence enabled. Thanks to Coverity scan for location this condition. This 'might' not have been leaking if sofia was automatically freeing this when the sofia object was destroyed, but all other locations where sip_header_as_string where called they were all followed by a su_free, so I assume not.
Possible leak if someone were to try and add extra headers to a channel that had either an inbound info on that session or the session were to be deflected. I don't see a way that these extra headers could be added outside of a C module subscribing to the session states, but just to make sure I'm adding these so that just like other extra header locations it's cleaned up.
Edge case for when you are subscribing to presence on a valet parking lot. In which case there would be a small leak.
Coverity reported an Uninitialized pointer read. Upon further digging it appears that there is a code path where incoming packets can come in out of order, so this section of code tries to see if it can find the missed packets. As per FS-5202 there is a case where under heavy load the packet exists, and has most of the packet parsed, but still has a NULL pointer for the packet buffer. These two lines would at least help detect the edge case.
My bad. some how a make didn't catch this issue after a cleanup refactor. In this instance buf is being treated as an 8 byte number, not a pointer.
full_contact must be freed by sofia. There isn't a chance of this having blown anything up, but Coverity is right that this should be initialized with NULL to be safe against future refactors.
Minor code cleanup. calling va_start without calling va_end doesn't leak does it? Either way, it's fixed now.
Theoretical memory leak where if attr_init failed, then check would have still been malloc'd but not used.
Add mod_xml_radius to the modules list, though disabled by default.