mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-18 19:04:02 -05:00
RADIUS: Use size_t instead of int for message attributes
While RADIUS messages are limited to 4 kB, use size_t to avoid even a theoretical overflow issue with 16-bit int. Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
a2c23195ad
commit
02b43c557c
@ -609,7 +609,7 @@ static int radius_msg_add_attr_to_array(struct radius_msg *msg,
|
|||||||
{
|
{
|
||||||
if (msg->attr_used >= msg->attr_size) {
|
if (msg->attr_used >= msg->attr_size) {
|
||||||
size_t *nattr_pos;
|
size_t *nattr_pos;
|
||||||
int nlen = msg->attr_size * 2;
|
size_t nlen = msg->attr_size * 2;
|
||||||
|
|
||||||
nattr_pos = os_realloc_array(msg->attr_pos, nlen,
|
nattr_pos = os_realloc_array(msg->attr_pos, nlen,
|
||||||
sizeof(*msg->attr_pos));
|
sizeof(*msg->attr_pos));
|
||||||
|
Loading…
Reference in New Issue
Block a user