[PATCH] missing null termination in power supply uevent
authorStephen Hemminger <shemminger@linux-foundation.org>
Thu, 20 Sep 2007 19:06:10 +0000 (12:06 -0700)
committerAnton Vorontsov <cbou@mail.ru>
Thu, 20 Sep 2007 21:22:23 +0000 (01:22 +0400)
Need to null terminate environment. Found by inspection
while looking for similar problems to platform uevent bug

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
drivers/power/power_supply_sysfs.c

index c7c4574..de3155b 100644 (file)
@@ -289,6 +289,7 @@ int power_supply_uevent(struct device *dev, char **envp, int num_envp,
                if (ret)
                        goto out;
        }
+       envp[i] = NULL;
 
 out:
        free_page((unsigned long)prop_buf);