Commit d1cf16c9 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Linus Torvalds

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: default avatarStephen Hemminger <shemminger@linux-foundation.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent afa684f6
...@@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev, char **envp, int num_envp, ...@@ -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, err = add_uevent_var(envp, num_envp, &cur_index, buffer, buffer_size,
&cur_len, "W1_SLAVE_ID=%024LX", &cur_len, "W1_SLAVE_ID=%024LX",
(unsigned long long)sl->reg_num.id); (unsigned long long)sl->reg_num.id);
envp[cur_index] = NULL;
if (err) if (err)
return err; return err;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment