On 29/06/12 14:43, Nikita Popov wrote:
> Hi internals!
>
> Anthony and me have been looking a lot at the crypt() code recently
> and noticed that there are some strange things going on in the buffer
> allocations for the sha algorithms.
>
> We did two commits to fix them up a bit:
>
> http://git.ph
On 06/29/2012 05:56 AM, Anthony Ferrara wrote:
> Additionally, it appears that SHA256/512 are way overallocating the buffer.
>
> For SHA512:
>
> int needed = (sizeof(sha512_salt_prefix) - 1
> + sizeof(sha512_rounds_prefix) + 9 + 1
> + salt_in_len +
Additionally, it appears that SHA256/512 are way overallocating the buffer.
For SHA512:
int needed = (sizeof(sha512_salt_prefix) - 1
+ sizeof(sha512_rounds_prefix) + 9 + 1
+ salt_in_len + 1 + 86 + 1);
output = emalloc(needed);
salt[salt_in_len] = '\
Hi internals!
Anthony and me have been looking a lot at the crypt() code recently
and noticed that there are some strange things going on in the buffer
allocations for the sha algorithms.
We did two commits to fix them up a bit:
http://git.php.net/?p=php-src.git;a=commitdiff;h=7e8276ca68fc622124