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>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1501188834-4499-1-git-send-email-damien.guibouret@partition-saving.com>
Date:   Thu, 27 Jul 2017 22:53:54 +0200
From:   Damien Guibouret <damien.guibouret@...tition-saving.com>
To:     linux-ext4@...r.kernel.org
Cc:     Damien Guibouret <damien.guibouret@...tition-saving.com>
Subject: [PATCH] e2fsprogs - dirhash.c: remove useless test and assignment in strtohash

On transformation of str to hash, computed value is initialised before
first byte modulo 4. But it is already initialised before entering loop
and after processing last byte modulo 4. So the corresponding test and
initialisation could be removed.

Signed-off-by: Damien Guibouret <damien.guibouret@...tition-saving.com>
---
 lib/ext2fs/dirhash.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/lib/ext2fs/dirhash.c b/lib/ext2fs/dirhash.c
index c4ac94e..4ba3f35 100644
--- a/lib/ext2fs/dirhash.c
+++ b/lib/ext2fs/dirhash.c
@@ -154,8 +154,6 @@ static void str2hashbuf(const char *msg, int len, __u32 *buf, int num,
 	if (len > num*4)
 		len = num * 4;
 	for (i=0; i < len; i++) {
-		if ((i % 4) == 0)
-			val = pad;
 		if (unsigned_flag)
 			c = (int) ucp[i];
 		else
-- 
2.5.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ