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] [day] [month] [year] [list]
Message-ID: <20140407111229.GA24665@bolet.org>
Date: Mon, 7 Apr 2014 13:12:29 +0200
From: Thomas Pornin <pornin@...et.org>
To: discussions@...sword-hashing.net
Subject: Re: [PHC] Re: Yarn issues

On Mon, Apr 07, 2014 at 02:58:42AM -0400, Bill Cox wrote:
> when mallocing main memory, you malloc(16 << m_cost), and I think it
> should have been malloc(16ULL << m_cost)

Just my opinon, but it should be: malloc((size_t)16 << m_cost)

The size_t type is the correct type for the size of things in memory:
it is what sizeof returns, and malloc() expects. That way, you will
have a value of the appropriate type, without forcing a conversion.


	--Thomas Pornin

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ