This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Unbound alloca in crypt routines - V2
- From: "Carlos O'Donell" <carlos at systemhalted dot org>
- To: Jeff Law <law at redhat dot com>
- Cc: libc-alpha at sources dot redhat dot com
- Date: Thu, 29 Mar 2012 18:36:36 -0400
- Subject: Re: [PATCH] Unbound alloca in crypt routines - V2
- References: <4F74ADD3.5060001@redhat.com>
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.