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: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ed2ba977d43a6031f78f9e49d739ef5094f512e4;p=linux-2.6 [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 c7c4574729..de3155b212 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);