This is the mail archive of the binutils@sourceware.org mailing list for the binutils 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]

[patch] check return from bfd_make_section


Usually gets checked.  Ptr will be dereferenced.

2007-07-25  Michael Snyder  <msnyder@access-company.com>

	* tekhex.c (first_phase): Check return value for null.

Index: tekhex.c
===================================================================
RCS file: /cvs/src/src/bfd/tekhex.c,v
retrieving revision 1.32
diff -p -r1.32 tekhex.c
*** tekhex.c	3 Jul 2007 14:26:42 -0000	1.32
--- tekhex.c	25 Jul 2007 21:31:17 -0000
*************** first_phase (bfd *abfd, int type, char *
*** 389,394 ****
--- 389,396 ----
  	    return FALSE;
  	  memcpy (n, sym, len + 1);
  	  section = bfd_make_section (abfd, n);
+ 	  if (section == NULL)
+ 	    return FALSE;
  	}
        while (*src)
  	{

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