Closed pali closed 3 years ago
Looks good. Thanks.
I've reverted the change with the release of 0.829. The behavior of propagating the error with a die
instead of hiding it (i.e. no SDP body is the same as corrupt) is actually documented and the code is supposed to handle this. Most of the code in Net::SIP did this already and I've now fixed the one remaining place. There is also external code which relies on this behavior to detect invalid SDP payloads and then treat them as invalid instead of non-existing.
I've now fixed the one remaining place.
Ok! If this prevents crashing Net::SIP then fine for me.
Net::SIP::SDP->new() can die in case supplied body is malformed. Net::SIP::Packet's sdp_body() method is called for every received SDP packet with packet content. So put Net::SIP::SDP->new() call into eval block to prevent Net::SIP crashing.