aboutsummaryrefslogtreecommitdiffstats
path: root/src/radius
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2020-03-22 16:00:28 (GMT)
committerJouni Malinen <j@w1.fi>2020-03-22 16:50:04 (GMT)
commit02b43c557c6638327b257c16f3b01aab468e5472 (patch)
tree48bcd273bb6a6c2c05a094430eb2efb56d4a7b11 /src/radius
parenta2c23195ade1fd6fad66b0fbad433133c492a2c9 (diff)
downloadhostap-02b43c557c6638327b257c16f3b01aab468e5472.zip
hostap-02b43c557c6638327b257c16f3b01aab468e5472.tar.gz
hostap-02b43c557c6638327b257c16f3b01aab468e5472.tar.bz2
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>
Diffstat (limited to 'src/radius')
-rw-r--r--src/radius/radius.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/radius/radius.c b/src/radius/radius.c
index 07240ea..be16e27 100644
--- a/src/radius/radius.c
+++ b/src/radius/radius.c
@@ -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));