summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index 4b48afa4..c2f7d48b 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -1779,8 +1779,9 @@ static int check_banip(char *host)
{
unsigned int thisip = 0;
char *ptr, *myhost = strdup(host);
+ char *strtok_pos;
- for( ptr = strtok(myhost, ".") ; ptr != NULL ; ptr = strtok(NULL, ".") )
+ for( ptr = strtok_r(myhost, ".", &strtok_pos) ; ptr != NULL ; ptr = strtok_r(NULL, ".", &strtok_pos) )
thisip = thisip * 256 + atoi(ptr);
free(myhost);