freeradius-server/freeradius-server-2.1.6-overflow.patch

12 lines
385 B
Diff

--- src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c
+++ src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c
@@ -771,7 +771,7 @@
nasip.s_addr = vp->vp_ipaddr;
strncpy(nasipstr, inet_ntoa(nasip), sizeof(nasipstr) - 1);
- nasipstr[sizeof(nasipstr)] = 0;
+ nasipstr[sizeof(nasipstr) - 1] = 0;
if (!nvp_query(__LINE__, data, sqlsock,
"UPDATE `%s`.`ips`, `radacct` "