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][BZ #16453] Don't use alloca in addgetnetgrentX


On Wednesday 15 January 2014 06:34:52 Siddhesh Poyarekar wrote:
> The bug report has a reproducer and I verified that the reproducer is
> fixed with this patch.  OK to commit?

is there no way for us to set up local paths for networking files specifically 
for testing purposes ?  seems like a pretty big hole in our testing abilities.

> +				    buflen = MAX (2 * buflen,
> +						  buflen + 2 * needed);
> +				    char *newbuf = xrealloc (buffer, buflen);
> +				    buffer = newbuf;

why newbuf ?  this should work fine:
	buffer = xrealloc (buffer, buflen);

> -			  extend_alloca (buffer, buflen, newsize);
> +			buflen *= 2;
> +			char *newbuf = xrealloc (buffer, buflen);
> +			buffer = newbuf;

same here
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


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