PATCH: PR binutils/14526: c++filt is crashed on large files
Ian Lance Taylor
iant@google.com
Wed Aug 29 00:56:00 GMT 2012
On Tue, Aug 28, 2012 at 11:33 AM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>
> buildargv uses alloca to allocate buffer, whose size may exceed stack
> limit. This patch replaces alloca with xmalloc/free. OK to install?
>
> Thanks.
>
> H.J.
> ---
> PR binutils/14526
> * argv.c (buildargv): Replace alloca with xmalloc/free.
This is OK.
Thanks.
Consider also replacing strdup with xstrdup. And there are other
malloc calls that could become xmalloc. I can't think of any way that
this code would be used where it needs to degrade gracefully when
short on memory.
Ian
More information about the Binutils
mailing list