diff options
Diffstat (limited to 'gdb/i386-cygwin-tdep.c')
-rw-r--r-- | gdb/i386-cygwin-tdep.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/i386-cygwin-tdep.c b/gdb/i386-cygwin-tdep.c index cee2adf..dc5d614 100644 --- a/gdb/i386-cygwin-tdep.c +++ b/gdb/i386-cygwin-tdep.c @@ -129,7 +129,7 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj) size_t module_name_size; CORE_ADDR base_addr; - char *buf = NULL; + gdb_byte *buf = NULL; if (strncmp (sect->name, ".module", 7) != 0) return; @@ -154,9 +154,9 @@ core_process_module_section (bfd *abfd, asection *sect, void *obj) module_name_size = extract_unsigned_integer (buf + 8, 4, byte_order); - module_name = buf + 12; - if (module_name - buf + module_name_size > bfd_get_section_size (sect)) + if (12 + module_name_size > bfd_get_section_size (sect)) goto out; + module_name = (char *) buf + 12; /* The first module is the .exe itself. */ if (data->module_count != 0) |