From ed2ba977d43a6031f78f9e49d739ef5094f512e4 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Thu, 20 Sep 2007 12:06:10 -0700 Subject: [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 --- drivers/power/power_supply_sysfs.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/power/power_supply_sysfs.c') diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index c7c4574729b1..de3155b21285 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); -- cgit v1.2.1