From: Stephen Hemminger Date: Tue, 25 Sep 2007 04:24:42 +0000 (-0700) Subject: missing null termination in one wire uevent X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d1cf16c91605d051d36360f70858b06b103b4aed;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git missing null termination in one wire uevent Need to null terminate environment. Found by inspection while looking for similar problems to platform uevent bug Signed-off-by: Stephen Hemminger Cc: Greg Kroah-Hartman Acked-by: Evgeniy Polyakov Cc: Andrew Morton Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/w1/w1.c b/drivers/w1/w1.c index 8d7ab74170d5..a593f900eff4 100644 --- a/drivers/w1/w1.c +++ b/drivers/w1/w1.c @@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp, err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size, &cur_len, "W1_SLAVE_ID=%024LX", (unsigned long long)sl->reg_num.id); + envp[cur_index] = NULL; if (err) return err;