sysctl: fix null checking in bin_dn_node_address()
[pandora-kernel.git] / kernel / sysctl_binary.c
index a650694..9f9aa32 100644 (file)
@@ -1194,9 +1194,10 @@ static ssize_t bin_dn_node_address(struct file *file,
 
                /* Convert the decnet address to binary */
                result = -EIO;
-               nodep = strchr(buf, '.') + 1;
+               nodep = strchr(buf, '.');
                if (!nodep)
                        goto out;
+               ++nodep;
 
                area = simple_strtoul(buf, NULL, 10);
                node = simple_strtoul(nodep, NULL, 10);