diff options
Diffstat (limited to 'gdb/win32-nat.c')
-rw-r--r-- | gdb/win32-nat.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gdb/win32-nat.c b/gdb/win32-nat.c index fb78535..27691f0 100644 --- a/gdb/win32-nat.c +++ b/gdb/win32-nat.c @@ -1,7 +1,7 @@ /* Target-vector operations for controlling win32 child processes, for GDB. - Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 Free - Software Foundation, Inc. + Copyright 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Free Software Foundation, Inc. Contributed by Cygnus Solutions, A Red Hat Company. @@ -2340,20 +2340,20 @@ core_section_load_dll_symbols (bfd * abfd, asection * sect, void *obj) if (strncmp (sect->name, ".module", 7)) return; - buf = (char *) xmalloc (sect->_raw_size + 1); + buf = (char *) xmalloc (bfd_get_section_size (sect) + 1); if (!buf) { printf_unfiltered ("memory allocation failed for %s\n", sect->name); goto out; } - if (!bfd_get_section_contents (abfd, sect, buf, 0, sect->_raw_size)) + if (!bfd_get_section_contents (abfd, sect, buf, 0, bfd_get_section_size (sect))) goto out; pstatus = (struct win32_pstatus *) buf; memmove (&base_addr, &(pstatus->data.module_info.base_address), sizeof (base_addr)); dll_name_size = pstatus->data.module_info.module_name_size; - if (offsetof (struct win32_pstatus, data.module_info.module_name) + dll_name_size > sect->_raw_size) + if (offsetof (struct win32_pstatus, data.module_info.module_name) + dll_name_size > bfd_get_section_size (sect)) goto out; dll_name = (char *) xmalloc (dll_name_size + 1); |