* config/bfin-parse.y (gen_multi_instr_1): Check anomaly
[deliverable/binutils-gdb.git] / bfd / simple.c
index dd69f9a55964670b8a62e2487c27676f871c9679..8e1c70b4a623da16d2e0eb1213ed1145066fba9d 100644 (file)
@@ -1,5 +1,5 @@
 /* simple.c -- BFD simple client routines
-   Copyright 2002, 2003, 2004, 2005, 2007, 2008
+   Copyright 2002, 2003, 2004, 2005, 2007, 2008, 2009
    Free Software Foundation, Inc.
    Contributed by MontaVista Software, Inc.
 
@@ -210,7 +210,8 @@ bfd_simple_get_relocated_section_contents (bfd *abfd,
   data = NULL;
   if (outbuf == NULL)
     {
-      data = bfd_malloc (sec->size);
+      bfd_size_type amt = sec->rawsize > sec->size ? sec->rawsize : sec->size;
+      data = bfd_malloc (amt);
       if (data == NULL)
        return NULL;
       outbuf = data;
This page took 0.023212 seconds and 4 git commands to generate.