提交 0117bdd9 authored 作者: Mathieu Parent's avatar Mathieu Parent

Skinny: Milestone 0 : no-op module (listeners and base skinny parsing)

Check for huge message

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16748 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 bf64b096
......@@ -621,9 +621,15 @@ static switch_status_t skinny_read_packet(listener_t *listener, skinny_message_t
request->length,request->reserved,request->type);
if(request->length < SKINNY_MESSAGE_FIELD_SIZE) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Skinny client sent invalid data. Length should be greated than 4 but got %d.\n",
"Skinny client sent invalid data. Length should be greater than 4 but got %d.\n",
request->length);
return SWITCH_STATUS_FALSE;
return SWITCH_STATUS_FALSE;
}
if(request->length + 2*SKINNY_MESSAGE_FIELD_SIZE > SKINNY_MESSAGE_MAXSIZE) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR,
"Skinny client sent too huge data. Got %d which is above threshold %d.\n",
request->length, SKINNY_MESSAGE_MAXSIZE - 2*SKINNY_MESSAGE_FIELD_SIZE);
return SWITCH_STATUS_FALSE;
}
if(bytes >= request->length + 2*SKINNY_MESSAGE_FIELD_SIZE) {
/* Message body */
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论