From: Stephen Hemminger Date: Thu, 20 Sep 2007 19:06:10 +0000 (-0700) Subject: [PATCH] missing null termination in power supply uevent X-Git-Tag: v2.6.23-rc8~5^2 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ed2ba977d43a6031f78f9e49d739ef5094f512e4;p=linux-2.6-omap-h63xx.git [PATCH] missing null termination in power supply uevent Need to null terminate environment. Found by inspection while looking for similar problems to platform uevent bug Signed-off-by: Stephen Hemminger --- diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index c7c4574729b..de3155b2128 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c @@ -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);