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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:	Wed, 29 Jun 2016 17:42:17 +0300
From:	Dan Carpenter <dan.carpenter@...cle.com>
To:	Herbert Xu <herbert@...dor.apana.org.au>
Cc:	"David S. Miller" <davem@...emloft.net>,
	Thomas Gleixner <tglx@...utronix.de>,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, x86@...nel.org,
	Megha Dey <megha.dey@...ux.intel.com>,
	Tim Chen <tim.c.chen@...ux.intel.com>,
	Xiaodong Liu <xiaodong.liu@...el.com>,
	Denys Vlasenko <dvlasenk@...hat.com>,
	"Wang, Rui Y" <rui.y.wang@...el.com>, linux-crypto@...r.kernel.org,
	linux-kernel@...r.kernel.org, kernel-janitors@...r.kernel.org
Subject: [patch] crypto: sha1-mb - cleanup a small | vs || typo

|| and | behave basically the same here but || was intended.  It causes
a static checker warning when we mix up logical and bitwise operations.

Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>

diff --git a/arch/x86/crypto/sha1-mb/sha1_mb.c b/arch/x86/crypto/sha1-mb/sha1_mb.c
index 561b286..96d80ad 100644
--- a/arch/x86/crypto/sha1-mb/sha1_mb.c
+++ b/arch/x86/crypto/sha1-mb/sha1_mb.c
@@ -304,7 +304,7 @@ static struct sha1_hash_ctx *sha1_ctx_mgr_submit(struct sha1_ctx_mgr *mgr,
 	 * Or if the user's buffer contains less than a whole block,
 	 * append as much as possible to the extra block.
 	 */
-	if ((ctx->partial_block_buffer_length) | (len < SHA1_BLOCK_SIZE)) {
+	if ((ctx->partial_block_buffer_length) || (len < SHA1_BLOCK_SIZE)) {
 		/*
 		 * Compute how many bytes to copy from user buffer into
 		 * extra block

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ