public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@redhat.com>
To: Thiemo Seufer <ica2_ts@csv.ica.uni-stuttgart.de>
Cc: binutils@sources.redhat.com
Subject: Re: [PATCH] Include alloca.h for bfd
Date: Thu, 23 Aug 2001 09:02:00 -0000	[thread overview]
Message-ID: <20010823180440.F5765@sunsite.ms.mff.cuni.cz> (raw)
In-Reply-To: <20010823174716.E3542@rembrandt.csv.ica.uni-stuttgart.de>

On Thu, Aug 23, 2001 at 05:47:16PM +0200, Thiemo Seufer wrote:
> 2001-08-23  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
> 
> 	/bfd/ChangeLog
> 	* linker.c (_bfd_generic_link_add_archive_symbols): Replace alloca()
> 	by bfd_malloc().
> 
> 
> diff -BurpNX /bigdisk/src/binutils-exclude src-orig/bfd/linker.c src/bfd/linker.c
> --- src-orig/bfd/linker.c	Sat Aug 18 21:47:22 2001
> +++ src/bfd/linker.c	Thu Aug 23 17:14:45 2001
> @@ -1007,9 +1007,10 @@ _bfd_generic_link_add_archive_symbols (a
>  	     let's look for its import thunk */
>  	  if (info->pei386_auto_import)
>  	    {
> -	      char *buf = alloca (strlen (h->root.string) + 10);
> +	      char *buf = (char *) bfd_malloc (strlen (h->root.string) + 10);

You need to check return value - bfd_malloc can return NULL (but will set
bfd error).

	Jakub

  reply	other threads:[~2001-08-23  9:02 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-21 12:09 Thiemo Seufer
2001-08-21 13:20 ` Ian Lance Taylor
2001-08-21 14:46   ` Thiemo Seufer
2001-08-21 14:56     ` Ian Lance Taylor
2001-08-23  7:42     ` Nick Clifton
2001-08-23  8:48       ` Thiemo Seufer
2001-08-23  9:02         ` Jakub Jelinek [this message]
2001-08-23  9:15           ` Thiemo Seufer
2001-08-23 10:13             ` Andrew Cagney
2001-08-23 10:29               ` Ian Lance Taylor
2001-08-23 11:42                 ` Andrew Cagney
2001-08-23 11:49                   ` Jakub Jelinek
2001-08-23 10:16             ` Nick Clifton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010823180440.F5765@sunsite.ms.mff.cuni.cz \
    --to=jakub@redhat.com \
    --cc=binutils@sources.redhat.com \
    --cc=ica2_ts@csv.ica.uni-stuttgart.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).