Fix an illegal memory access in the BFD library which can be triggered by attempting...
[deliverable/binutils-gdb.git] / bfd / coffgen.c
index d49b2ff201ebf48fe5293b8f70e220db3a314c40..0a2697268e90fd2af3285db293934240afb26398 100644 (file)
@@ -1814,7 +1814,7 @@ coff_get_normalized_symtab (bfd *abfd)
       internal_ptr->is_sym = TRUE;
 
       /* PR 17512: Prevent buffer overrun.  */
-      if (symbol_ptr->u.syment.n_numaux > (raw_end - raw_src) / symesz)
+      if (symbol_ptr->u.syment.n_numaux > ((raw_end - 1) - raw_src) / symesz)
        {
          bfd_release (abfd, internal);
          return NULL;
This page took 0.024793 seconds and 4 git commands to generate.