public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: walter harms <wharms@bfs.de>
To: kernel-janitors@vger.kernel.org
Subject: Re: [patch] cifs: writing past the end of the array
Date: Tue, 08 Mar 2011 08:25:36 +0000	[thread overview]
Message-ID: <4D75E800.5090302@bfs.de> (raw)
In-Reply-To: <20110306132621.GN3416@bicker>



Am 07.03.2011 17:09, schrieb Jeff Layton:
> On Sun, 06 Mar 2011 18:11:23 +0100
> walter harms <wharms@bfs.de> wrote:
> 
>>
>>
>> Am 06.03.2011 14:26, schrieb Dan Carpenter:
>>> This is a cut and paste error.  p16 only has 16 chars, not 21.
>>>
>>> Signed-off-by: Dan Carpenter <error27@gmail.com>
>>>
>>> diff --git a/fs/cifs/smbencrypt.c b/fs/cifs/smbencrypt.c
>>> index 3967635..1525d5e 100644
>>> --- a/fs/cifs/smbencrypt.c
>>> +++ b/fs/cifs/smbencrypt.c
>>> @@ -353,7 +353,7 @@ SMBNTencrypt(unsigned char *passwd, unsigned char *c8, unsigned char *p24)
>>>  	int rc;
>>>  	unsigned char p16[16], p21[21];
>>>  
>>> -	memset(p16, '\0', 21);
>>> +	memset(p16, '\0', 16);
>>>  	memset(p21, '\0', 21);
>>>  
>>>  	rc = E_md4hash(passwd, p16);
>>
>>
>> perhaps ARRAY_SIZE() instead of a magic number is a better choice ?
>>
> 
> Agreed. Care to propose a patch? There are almost certainly other
> places in the code that could use a similar cleanup.
> 

Dan, i think he is sending to you :)

re,
 wh

  parent reply	other threads:[~2011-03-08  8:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-06 13:26 [patch] cifs: writing past the end of the array Dan Carpenter
2011-03-06 14:56 ` Shirish Pargaonkar
2011-03-06 17:11 ` walter harms
     [not found]   ` <4D73C03B.1050905-fPG8STNUNVg@public.gmane.org>
2011-03-07 16:09     ` Jeff Layton
2011-03-08  8:25 ` walter harms [this message]
2011-03-08 11:05 ` Dan Carpenter

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=4D75E800.5090302@bfs.de \
    --to=wharms@bfs.de \
    --cc=kernel-janitors@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