|
Message-ID: <1aed7f4d705f7de7d118b50f9a78816b@smtp.hushmail.com> Date: Sun, 17 Jun 2012 00:38:10 +0200 From: magnum <john.magnum@...hmail.com> To: john-dev@...ts.openwall.com Subject: Re: Re: [patch] optional new raw sha1 implemetation On 2012-06-17 00:15, magnum wrote: > Tavis, > > I see a problem in binary(). You alloc space for a binary and return it > to john, but john will only copy it so this is a memory leak. We could > change it to a one-time alloc: > > static uint32_t *result; > if (!result) > result = mem_alloc_tiny(SHA1_DIGEST_SIZE, MEM_ALIGN_SIMD); > > However, as the alignment requirement is not really in binary() itself, > we could just as well do this: > > static uint32_t result[SHA1_DIGEST_SIZE/sizeof(uint32_t)]; > > And actually no matter how we do this, john will (currently) copy it > with MEM_ALIGN_WORD in loader.c. After reading the rest of the code, MEM_ALIGN_WORD seem to be OK. I'll commit the static fix. magnum
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.