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

14 lines
625 B
Diff

Index: src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c
===================================================================
--- src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c.orig 2010-06-21 21:15:56.000000000 +0200
+++ src/modules/rlm_sqlhpwippool/rlm_sqlhpwippool.c 2010-06-21 21:16:15.000000000 +0200
@@ -771,7 +771,7 @@ static int sqlhpwippool_accounting(void
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` "