From fb6e5c55206f732aac9f05cddacb29e46f43e5c0 Mon Sep 17 00:00:00 2001 From: Orjan Friberg Date: Fri, 10 Aug 2001 09:59:33 +0000 Subject: [PATCH] 2001-08-10 Orjan Friberg * remote.c (read_frame): Correct off-by-one error in condition. --- gdb/ChangeLog | 4 ++++ gdb/remote.c | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ff0205f3a19..5e6b10bf538 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2001-08-10 Orjan Friberg + + * remote.c (read_frame): Correct off-by-one error in condition. + 2001-08-08 Don Howard * stabsread.c (read_type): Add support for const and volatile diff --git a/gdb/remote.c b/gdb/remote.c index be90b2024e8..ecf9afcfea9 100644 --- a/gdb/remote.c +++ b/gdb/remote.c @@ -4189,7 +4189,7 @@ read_frame (char *buf, if (repeat > 0 && repeat <= 255 && bc > 0 - && bc + repeat < sizeof_buf - 1) + && bc + repeat - 1 < sizeof_buf - 1) { memset (&buf[bc], buf[bc - 1], repeat); bc += repeat; -- 2.30.2