freetdm: ISDN - Added check for receiving frames that are too big

This commit is contained in:
David Yat Sin 2012-01-03 11:29:41 -05:00
parent 679da2f0f6
commit 959e4ab22d

View File

@ -481,6 +481,11 @@ void sngisdn_snd_data(ftdm_channel_t *dchan, uint8_t *data, ftdm_size_t len)
sng_l1_frame_t l1_frame;
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) dchan->span->signal_data;
if (len > sizeof(l1_frame.data)) {
ftdm_assert(FTDM_FALSE, "Received frame exceeding max size\n");
return;
}
memset(&l1_frame, 0, sizeof(l1_frame));
l1_frame.len = len;