bounds check next_token() to prevent possible buffer overflows
[samba.git] / source3 / lib / interface.c
index 8cc5cfb0b16ff36040760c80423b51f8efb41248..581a2135bd8e8abf6071130f4460b3df20043419 100644 (file)
@@ -136,7 +136,7 @@ static void interpret_interfaces(char *s, struct interface **interfaces,
   allones_ip = *interpret_addr2("255.255.255.255");
   loopback_ip = *interpret_addr2("127.0.0.1");
 
-  while (next_token(&ptr,token,NULL)) {
+  while (next_token(&ptr,token,NULL,sizeof(token))) {
     /* parse it into an IP address/netmasklength pair */
     char *p = strchr(token,'/');
     if (p) *p++ = 0;