This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [Patch] [BZ 13761] Fix another unbound alloca
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>
- Date: Tue, 21 Aug 2012 15:18:12 -0700 (PDT)
- Subject: Re: [Patch] [BZ 13761] Fix another unbound alloca
- References: <5034064B.9070103@redhat.com>
It's always easier to review when you include the patch afresh.
Off hand I see one typo (missing space before an =).
An XXX comment is not sufficient handling of malloc failure.
We need to figure out what is the robust behavior there.
Also, it's never really necessary to cast the result of malloc or alloca.
That's what void * is for (this is not C++). There were gratuitous casts
in the old code, but there's no need to repeat the pattern.
Thanks,
Roland