linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg KH <greg@kroah.com>
To: linux-hotplug@vger.kernel.org
Subject: Re: [PATCH] udev - read long lines from config files overflow fix
Date: Fri, 10 Sep 2004 20:03:23 +0000	[thread overview]
Message-ID: <20040910200323.GA19444@kroah.com> (raw)
In-Reply-To: <20040904170854.GA12270@spock.enterprise>

On Mon, Sep 06, 2004 at 02:28:11AM +0800, Arun Bhanu wrote:
> Hi Kay,
> 
> On 23:12 Sat 04 Sep     , Kay Sievers wrote:
> > Cool, a real bug :)
> > Thanks, for the patch. I think it would be better to skip lenghth exceeding
> > lines instead of cutting it and continue. While looking at it I restructured
> > the buffer reading logic a bit and fixed another stupid bug.
> Thanks for the cleanup.
> 
> You may have overlooked the fix for udev_config.c(parsing udev.conf) in
> your patch.  So, I've adapted the fixes you applied to namedev_parse.c
> to this file also.
> 
> Also, while 'eating' the whitespace the 'count' doesn't get decremented.
> This leads strncpy to copy the number of whitespace minus 1 characters
> from the next line. Minus 1 because it copies '\n' from the current
> line.
> 
> 		while (isspace(bufline[0])) {
> 			bufline++;
> +			count--;
> 		}
> 		.
> 		.
> 		.
> 		strncpy(line, bufline, count);
> 
> Included patch(against udev-030) contains the above fixes as well as
> your fixes.

Applied, thanks.

greg k-h


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM. 
Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

      parent reply	other threads:[~2004-09-10 20:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-04 17:08 [PATCH] udev - read long lines from config files overflow fix Arun Bhanu
2004-09-04 21:12 ` Kay Sievers
2004-09-05 18:28 ` Arun Bhanu
2004-09-05 18:51 ` Kay Sievers
2004-09-10 20:03 ` Greg KH [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=20040910200323.GA19444@kroah.com \
    --to=greg@kroah.com \
    --cc=linux-hotplug@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;
as well as URLs for NNTP newsgroup(s).