From: DJ Delorie <dj@redhat.com>
To: msnyder@sonic.net
Cc: binutils@sourceware.org
Subject: Re: [patch] coffgen.c, degenerate case
Date: Thu, 26 Jul 2007 01:59:00 -0000 [thread overview]
Message-ID: <200707260149.l6Q1nZZl000837@greed.delorie.com> (raw)
In-Reply-To: <22417.12.7.175.2.1185413421.squirrel@webmail.sonic.net> (msnyder@sonic.net)
This is OK.
> 2007-07-25 Michael Snyder <msnyder@access-company.com>
>
> * coffgen.c (_bfd_coff_get_external_symbols): Nothing to be done
> if size == 0; return and avoid possible null pointer issues.
>
> Index: coffgen.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/coffgen.c,v
> retrieving revision 1.59
> diff -p -r1.59 coffgen.c
> *** coffgen.c 12 Jul 2007 07:16:40 -0000 1.59
> --- coffgen.c 26 Jul 2007 01:27:09 -0000
> *************** _bfd_coff_get_external_symbols (bfd *abf
> *** 1444,1452 ****
> symesz = bfd_coff_symesz (abfd);
>
> size = obj_raw_syment_count (abfd) * symesz;
>
> syms = bfd_malloc (size);
> ! if (syms == NULL && size != 0)
> return FALSE;
>
> if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
> --- 1449,1459 ----
> symesz = bfd_coff_symesz (abfd);
>
> size = obj_raw_syment_count (abfd) * symesz;
> + if (size == 0)
> + return TRUE;
>
> syms = bfd_malloc (size);
> ! if (syms == NULL)
> return FALSE;
>
> if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0
> ------=_20070725183021_75864--
>
>
next prev parent reply other threads:[~2007-07-26 1:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 23:45 msnyder
[not found] ` <xnfy3c557p.fsf@greed.delorie.com>
[not found] ` <22417.12.7.175.2.1185413421.squirrel@webmail.sonic.net>
2007-07-26 1:59 ` DJ Delorie [this message]
2007-07-26 2:19 ` msnyder
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=200707260149.l6Q1nZZl000837@greed.delorie.com \
--to=dj@redhat.com \
--cc=binutils@sourceware.org \
--cc=msnyder@sonic.net \
/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).