forked from Mirrors/freeswitch
freetdm: ISDN - Added check for receiving frames that are too big
This commit is contained in:
parent
679da2f0f6
commit
959e4ab22d
@ -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;
|
sng_l1_frame_t l1_frame;
|
||||||
sngisdn_span_data_t *signal_data = (sngisdn_span_data_t*) dchan->span->signal_data;
|
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));
|
memset(&l1_frame, 0, sizeof(l1_frame));
|
||||||
l1_frame.len = len;
|
l1_frame.len = len;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user