Constify main.c:get_init_files.
[deliverable/binutils-gdb.git] / opcodes / dis-buf.c
index 7e3fd63a88a13e7247c3fd7d60f9d608840ff56a..372fb96b280832ea2328f8e445a97f803d82d772 100644 (file)
@@ -1,6 +1,6 @@
 /* Disassemble from a buffer, for GNU.
    Copyright 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005,
-   2007, 2009  Free Software Foundation, Inc.
+   2007, 2009, 2010  Free Software Foundation, Inc.
 
    This file is part of the GNU opcodes library.
 
@@ -38,6 +38,7 @@ buffer_read_memory (bfd_vma memaddr,
   unsigned int octets = (memaddr - info->buffer_vma) * opb;
 
   if (memaddr < info->buffer_vma
+      || memaddr - info->buffer_vma > max_addr_offset
       || memaddr - info->buffer_vma + end_addr_offset > max_addr_offset)
     /* Out of bounds.  Use EIO because GDB uses it.  */
     return EIO;
This page took 0.023624 seconds and 4 git commands to generate.