mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org, Karsten Keil <isdn@linux-pingi.de>,
	isdn4linux@listserv.isdn4linux.de,
	Andrew Morton <akpm@linux-foundation.org>,
	tj@elte.hu
Subject: Re: [PATCH, v2] isdn: Fix stack corruption in isdnloop_init()
Date: Wed, 2 Sep 2009 06:14:39 -0700	[thread overview]
Message-ID: <20090902061439.6c60124c@infradead.org> (raw)
In-Reply-To: <20090902130336.GA16906@elte.hu>

On Wed, 2 Sep 2009 15:03:36 +0200
Ingo Molnar <mingo@elte.hu> wrote:

> 
> [ v2: use strlen instead of sizeof. ]
> 
> diff --git a/drivers/isdn/isdnloop/isdnloop.c
> b/drivers/isdn/isdnloop/isdnloop.c index a335c85..0c8d8cb 100644
> --- a/drivers/isdn/isdnloop/isdnloop.c
> +++ b/drivers/isdn/isdnloop/isdnloop.c
> @@ -1494,7 +1494,7 @@ static int __init
>  isdnloop_init(void)
>  {
>  	char *p;
> -	char rev[10];
> +	char rev[strlen(revision)+1];
>  
>  	if ((p = strchr(revision, ':'))) {
>  		strcpy(rev, p + 1);

now it;s a runtime variable sized array.
NotNice(tm)


-- 
Arjan van de Ven 	Intel Open Source Technology Centre
For development, discussion and tips for power savings, 
visit http://www.lesswatts.org

  reply	other threads:[~2009-09-02 13:11 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-02 12:44 [PATCH] " Ingo Molnar
2009-09-02 13:03 ` [PATCH, v2] " Ingo Molnar
2009-09-02 13:14   ` Arjan van de Ven [this message]
2009-09-02 13:34     ` Karsten Keil
2009-09-02 14:02     ` [PATCH, v3] " Ingo Molnar
2009-09-04  0:16       ` Andrew Morton

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=20090902061439.6c60124c@infradead.org \
    --to=arjan@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=isdn4linux@listserv.isdn4linux.de \
    --cc=isdn@linux-pingi.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tj@elte.hu \
    /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

all inboxes | Powered by JetHome®