- don't allow too big packets to send.

This commit is contained in:
MelwareDE 2006-05-18 14:35:02 +00:00
parent 23973edf04
commit befe1c83f1
1 changed files with 6 additions and 0 deletions

View File

@ -231,6 +231,12 @@ int capi_write_rtp(struct ast_channel *c, struct ast_frame *f)
struct sockaddr_in us;
int len;
if (f->datalen > (CAPI_MAX_B3_BLOCK_SIZE + rtpheaderlen)) {
cc_verbose(4, 0, VERBOSE_PREFIX_4 "%s: rtp write data: frame too big (len = %d).\n",
i->name, f->datalen);
return -1;
}
i->send_buffer_handle++;
ast_rtp_get_us(i->rtp, &us);