From: Michael Snyder Date: Sun, 27 Feb 2011 21:20:06 +0000 (+0000) Subject: 2011-02-26 Michael Snyder X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0adea5f702d7d2a2e4441c18556402ba415e9c2e;p=binutils-gdb.git 2011-02-26 Michael Snyder * linux-low.c (linux_xfer_siginfo): Fix fencepost error. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 29b175fa98b..a8479b8c0ef 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,5 +1,7 @@ 2011-02-27 Michael Snyder + * linux-low.c (linux_xfer_siginfo): Fix fencepost error. + * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error in comparison. diff --git a/gdb/gdbserver/linux-low.c b/gdb/gdbserver/linux-low.c index 93f3570252c..7b8eba777c2 100644 --- a/gdb/gdbserver/linux-low.c +++ b/gdb/gdbserver/linux-low.c @@ -4728,7 +4728,7 @@ linux_xfer_siginfo (const char *annex, unsigned char *readbuf, readbuf != NULL ? "Reading" : "Writing", pid); - if (offset > sizeof (siginfo)) + if (offset >= sizeof (siginfo)) return -1; if (ptrace (PTRACE_GETSIGINFO, pid, 0, &siginfo) != 0)