Make sure variables are empty before call of sscanf()

This commit is contained in:
DL6ER
2017-01-25 11:47:20 +01:00
parent 915bbb3e5d
commit 8646507f37

View File

@@ -51,7 +51,7 @@ function readStaticLeasesFile()
while(!feof($dhcpstatic))
{
// Remove any possibly existing variable with this name
$mac = "";
$mac = ""; $one = ""; $two = "";
sscanf(trim(fgets($dhcpstatic)),"dhcp-host=%[^,],%[^,],%[^,]",$mac,$one,$two);
if(strlen($mac) > 0)
{