mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Armin Schindler <armin@melware.de>
To: Dan Carpenter <error27@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] eicon: make buffer larger
Date: Wed, 6 Oct 2010 14:49:52 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.00.1010061443480.30674@justus.melware.de> (raw)
In-Reply-To: <20101006121119.GA11681@bicker>

On Wed, 6 Oct 2010, Dan Carpenter wrote:
> On Wed, Oct 06, 2010 at 10:44:47AM +0200, Armin Schindler wrote:
>>>   927    strcpy (clients[id].drvName,     tmp);
>>>   928    strcpy (clients[id].Dbg.drvName, tmp);
>>>                               ^
>>>                    this buffer is only 16 chars
>>
>> Now I understand. You are right. So the fix would be to change these
>> strcpy() to e.g. strncpy() or similar.
>>
>
> We need more than 16 characters to store the information.  What is the
> problem with just making the buffer larger?

The larger buffer is not really needed. Later versions of the driver will 
use the strcpy/memcpy with checked size anyway.
I just want to avoid a change in the debug structure which is used in more than one module/tool.

But it shouldn't be a real problem.

Armin



  reply	other threads:[~2010-10-06 12:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-04 19:24 Dan Carpenter
2010-10-06  7:25 ` Armin Schindler
2010-10-06  7:47   ` Dan Carpenter
2010-10-06  8:16     ` walter harms
2010-10-06  8:21     ` Armin Schindler
2010-10-06  8:31       ` Dan Carpenter
2010-10-06  8:44         ` Armin Schindler
2010-10-06 12:11           ` Dan Carpenter
2010-10-06 12:49             ` Armin Schindler [this message]
2010-10-07  6:30 ` David Miller

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=alpine.DEB.2.00.1010061443480.30674@justus.melware.de \
    --to=armin@melware.de \
    --cc=error27@gmail.com \
    --cc=isdn@linux-pingi.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@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

all inboxes | Powered by JetHome®