This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix use-after-free in glob when expanding ~user (bug 25414)


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]