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]
Message-ID: <20110920174757.GA1330@ioremap.net>
Date:	Tue, 20 Sep 2011 21:47:57 +0400
From:	Evgeniy Polyakov <zbr@...emap.net>
To:	rikmorgandev@...il.com
Cc:	linux-kernel@...r.kernel.org
Subject: Re: POHMELFS is back

On Tue, Sep 20, 2011 at 11:05:17AM -0600, Rick Morgan (rikmorgan@...il.com) wrote:
> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

Please do not use inline html

>   <pre wrap="">+static inline int dnet_id_cmp_str(const unsigned char *id1, const unsigned char *id2)
> +{
> +	unsigned int <b>i = 0</b>;
> +
> +	for (<b>i*=sizeof</b>(unsigned long); i&lt;DNET_ID_SIZE; ++i) {
> +		if (id1[i] &lt; id2[i])
> +			return -1;
> +		if (id1[i] &gt; id2[i])
> +			return 1;
> +	}
> +
> +	return 0;
> +}
>   </pre>
> </blockquote>
> if i is initialized to 0, wouldn't i*=sizeof(unsigned long) be zero?<br>

Yes, it counts from zero. This chunk previously checked another
parameter first, but since then it was removed, but checking loop
remained.

-- 
	Evgeniy Polyakov
--
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