buf = (char *) xmalloc (sect->_raw_size + 1);
buf = (char *) xmalloc (bfd_get_section_size (sect) + 1);
core_section_load_dll_symbols (bfd * abfd, asection * sect, void *obj){  struct target_ops *target = (struct target_ops *) obj;  DWORD base_addr;  int dll_name_size;  char *dll_name = NULL;  char *buf = NULL;  struct win32_pstatus *pstatus;  char *p;  if (strncmp (sect->name, ".module", 7))    return;  buf = (char *) xmalloc (sect->_raw_size + 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))    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)      goto out;  dll_name = (char *) xmalloc (dll_name_size + 1);  if (!dll_name)    {      printf_unfiltered ("memory allocation failed for %s\n", sect->name);      goto out;    }  strncpy (dll_name, pstatus->data.module_info.module_name, dll_name_size);  while ((p = strchr (dll_name, '\\')))    *p = '/';  if (!core_dll_symbols_add (dll_name, (DWORD) base_addr))    printf_unfiltered ("%s: Failed to load dll symbols.\n", dll_name);  if (!dll_code_sections_add (dll_name, (DWORD) base_addr + 0x1000, target))    printf_unfiltered ("%s: Failed to map dll code sections.\n", dll_name);out:  if (buf)    xfree (buf);  if (dll_name)    xfree (dll_name);  return;}