From: Stephen Hemminger Date: Thu, 20 Sep 2007 19:06:10 +0000 (-0700) Subject: [PATCH] missing null termination in power supply uevent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ed2ba977d43a6031f78f9e49d739ef5094f512e4;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 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);