This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Fix use-after-free in glob when expanding ~user (bug 25414)
- From: Paul Eggert <eggert at cs dot ucla dot edu>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 19 Feb 2020 12:40:11 -0800
- Subject: Re: [PATCH] Fix use-after-free in glob when expanding ~user (bug 25414)
- References: <mvmmu9e1pyd.fsf@suse.de>
On 2/19/20 8:50 AM, Andreas Schwab wrote:
+ int use_alloca = glob_use_alloca (alloca_used,
+ home_len + rest_len + 1);
I suggest using 'bool' instead of 'int' here, since the value is boolean
and glob_use_alloca returns 'bool'. Although some of the nearby local
vars use 'int' to represent booleans, surely this is because the code
predates 'bool'; for new code it's better to use 'bool' for booleans.
Otherwise, looks good; thanks.