提交 3209e645 authored 作者: Anthony Minessale's avatar Anthony Minessale

don't overrun buffer (FSCORE-95)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7346 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 db9b5288
......@@ -198,7 +198,7 @@ SWITCH_DECLARE(char *) switch_stun_packet_attribute_get_username(switch_stun_pac
{
uint16_t cpylen;
cpylen = attribute->length > len ? attribute->length : len;
cpylen = attribute->length < len ? attribute->length : len;
return memcpy(username, attribute->value, cpylen);
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论