lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110208163531.GO4384@bicker>
Date:	Tue, 8 Feb 2011 19:35:31 +0300
From:	Dan Carpenter <error27@...il.com>
To:	Belisko Marek <marek.belisko@...il.com>
Cc:	Marek Belisko <marek.belisko@...n-nandra.com>, gregkh@...e.de,
	devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/5] staging: ft1000: Fix coding style in
 write_blk_fifo() function.

On Tue, Feb 08, 2011 at 02:40:49PM +0100, Belisko Marek wrote:
> On Wed, Jan 26, 2011 at 3:30 PM, Dan Carpenter <error27@...il.com> wrote:
> > Also when it does:
> >        memcpy(ft1000dev->tx_buf, *pUcFile, byte_length);
> >
> > That should probably be:
> >        memcpy(ft1000dev->tx_buf, *pUcFile, word_length * 4);
> No this shouldn't because before you have additional check:
> if (byte_length && ((byte_length % 64) == 0))
>         byte_length += 4;
> 
> if (byte_length < 64)
>         byte_length = 68;
> So in my opinion byte_length should stay.

Yes.  We make byte_length longer than the caller intended.  The caller
knows the size of the source buffer.  We have to pad the length of the
other buffer, but we should fill up the last part with zeroes instead
of reading past the end of the source buffer.

(I am not very familiar with the code and I haven't looked outside this
function, so I may be wrong).

Also I really bet that the thing where byte_length can't be a multiple
of 64 is bogus.  I've never heard of anything with a requirement like
that.

regards,
dan carpenter


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ