SpanDSP is a low-level signal processing library that modulates and demodulates signals commonly used in telephony, such as the "noise" generated by a fax modem or DTMF touchpad.
Other
141
stars
117
forks
source link
Fix crash when FCD frame has bad length but CRC is OK. #39
That fix is silently ignoring the reception of a good (i.e. the CRC is OK) frame with bad contents, which should not happen. A better fix is something like:
if (len < 4)
{
span_log(&s->logging, SPAN_LOG_FLOW, "Bad length for FCD frame - %d\n", len);
/* This frame didn't get corrupted in transit, because its CRC is OK. It was sent bad
and there is little possibility that causing a retransmission will help. It is best
to just give up. */
t30_set_status(s, T30_ERR_TX_ECMPHD);
terminate_call(s);
return;
}
/*endif*/
at the start of process_rx_fcd(), to record that the erroneous from was received, and handle it similarly to other bad frames
That fix is silently ignoring the reception of a good (i.e. the CRC is OK) frame with bad contents, which should not happen. A better fix is something like:
at the start of process_rx_fcd(), to record that the erroneous from was received, and handle it similarly to other bad frames