public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@linux-foundation.org>
To: Andrew Morton <akpm@linux-foundation.org>,
	Greg Kroah-Hartman <gregkh@suse.de>,
	Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] missing null termination in one wire uevent
Date: Thu, 20 Sep 2007 12:06:11 -0700	[thread overview]
Message-ID: <20070920190627.671886126@linux-foundation.org> (raw)
In-Reply-To: 20070920190608.339749785@linux-foundation.org

[-- Attachment #1: sysfs-wl.patch --]
[-- Type: text/plain, Size: 621 bytes --]

Need to null terminate environment. Found by inspection
while looking for similar problems to platform uevent bug

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>

--- a/drivers/w1/w1.c	2007-08-18 07:50:12.000000000 -0700
+++ b/drivers/w1/w1.c	2007-09-20 11:44:06.000000000 -0700
@@ -431,6 +431,7 @@ static int w1_uevent(struct device *dev,
 	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;
 

-- 
Stephen Hemminger <shemminger@linux-foundation.org>


      parent reply	other threads:[~2007-09-20 19:11 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070920190608.339749785@linux-foundation.org>
2007-09-20 19:06 ` [PATCH 1/3] fix OOPS in platform uevent Stephen Hemminger
2007-09-20 19:06 ` [PATCH 2/3] missing null termination in power supply uevent Stephen Hemminger
2007-09-20 21:38   ` Anton Vorontsov
2007-09-20 19:06 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070920190627.671886126@linux-foundation.org \
    --to=shemminger@linux-foundation.org \
    --cc=akpm@linux-foundation.org \
    --cc=gregkh@suse.de \
    --cc=johnpol@2ka.mipt.ru \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox