[PATCH] Unbound alloca in crypt routines - V2

Carlos O'Donell carlos@systemhalted.org
Thu Mar 29 22:36:00 GMT 2012


On Thu, Mar 29, 2012 at 2:45 PM, Jeff Law <law@redhat.com> wrote:
>
> This is the updated version of the patch.  No changes in behaviour from the
> prior version, just removal of comments, unnecessary braces & whitespace,
> and a couple typos in the ChangeLog.
>
> Since this was done by editing the patch itself, I did a fresh build to make
> sure I didn't goof anything ;-)
>

I see no way for the malloc'd memory to leak, and you covered the all
function exits.

Given that crypt is neither re-entrant nor thread-safe there is no
async signal/cancel we need to worry about.

OK to checkin if you...

(1) Adjust the copyright year on each file.

and...

(2) Always add alloca_used to the size passed to __libc_use_alloca
even if alloca_used would equal 0, that way someone in the future
won't accidentally make the mistake if putting an alloca *before* your
first call to __libc_use_alloca and forget to fixup the other caller
to include "alloca_used +".

Cheers,
Carlos.



More information about the Libc-alpha mailing list