mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-10-14 03:15:06 +08:00
opcodes/
2005-12-08 Jan Beulich <jbeulich@novell.com> * i386-dis.c (MAXLEN): Reduce to architectural limit. (fetch_data): Check for sufficient buffer size.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2005-12-08 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
|
* i386-dis.c (MAXLEN): Reduce to architectural limit.
|
||||||
|
(fetch_data): Check for sufficient buffer size.
|
||||||
|
|
||||||
2005-12-08 Jan Beulich <jbeulich@novell.com>
|
2005-12-08 Jan Beulich <jbeulich@novell.com>
|
||||||
|
|
||||||
* i386-dis.c (OP_ST): Remove prefix in Intel mode.
|
* i386-dis.c (OP_ST): Remove prefix in Intel mode.
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
#include "sysdep.h"
|
#include "sysdep.h"
|
||||||
#include "opintl.h"
|
#include "opintl.h"
|
||||||
|
|
||||||
#define MAXLEN 20
|
#define MAXLEN 15
|
||||||
|
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
|
||||||
@ -179,10 +179,13 @@ fetch_data (struct disassemble_info *info, bfd_byte *addr)
|
|||||||
struct dis_private *priv = (struct dis_private *) info->private_data;
|
struct dis_private *priv = (struct dis_private *) info->private_data;
|
||||||
bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
|
bfd_vma start = priv->insn_start + (priv->max_fetched - priv->the_buffer);
|
||||||
|
|
||||||
status = (*info->read_memory_func) (start,
|
if (addr <= priv->the_buffer + MAXLEN)
|
||||||
priv->max_fetched,
|
status = (*info->read_memory_func) (start,
|
||||||
addr - priv->max_fetched,
|
priv->max_fetched,
|
||||||
info);
|
addr - priv->max_fetched,
|
||||||
|
info);
|
||||||
|
else
|
||||||
|
status = -1;
|
||||||
if (status != 0)
|
if (status != 0)
|
||||||
{
|
{
|
||||||
/* If we did manage to read at least one byte, then
|
/* If we did manage to read at least one byte, then
|
||||||
|
Reference in New Issue
Block a user