Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions core/AmRtpStream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,11 @@ bool AmRtpStream::getRemoteHold() {

void AmRtpStream::recvDtmfPacket(AmRtpPacket* p) {
if (p->payload == getLocalTelephoneEventPT()) {
// a telephone-event payload is exactly sizeof(dtmf_payload_t) bytes; a
// truncated packet would make the cast below read past the received data
// and yield bogus event/volume/duration values.
Comment on lines +858 to +860
if (p->getDataSize() != sizeof(dtmf_payload_t))
return;
dtmf_payload_t* dpl = (dtmf_payload_t*)p->getData();

DBG("DTMF: event=%i; e=%i; r=%i; volume=%i; duration=%i; ts=%u session = [%p]\n",
Expand Down
Loading