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
1 changed files with 1 additions and 1 deletions
|
@ -609,7 +609,7 @@ static int radius_msg_add_attr_to_array(struct radius_msg *msg,
|
|||
{
|
||||
if (msg->attr_used >= msg->attr_size) {
|
||||
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,
|
||||
sizeof(*msg->attr_pos));
|
||||
|
|
Loading…
Reference in a new issue