From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Mikael Starvik <starvik@axis.com>,
Jesper Nilsson <jesper.nilsson@axis.com>
Cc: linux-cris-kernel@axis.com, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH 07/10] cris/kgdb: Fix buffer overflow in getpacket()
Date: Tue, 12 Feb 2013 15:52:54 +0100 [thread overview]
Message-ID: <1360680777-12622-8-git-send-email-geert@linux-m68k.org> (raw)
In-Reply-To: <1360680777-12622-1-git-send-email-geert@linux-m68k.org>
arch/cris/arch-v10/kernel/kgdb.c: In function 'handle_exception':
arch/cris/arch-v10/kernel/kgdb.c:534:17: warning: array subscript is above array bounds [-Warray-bounds]
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
arch/cris/arch-v10/kernel/kgdb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/cris/arch-v10/kernel/kgdb.c b/arch/cris/arch-v10/kernel/kgdb.c
index d0b6257..0e79907 100644
--- a/arch/cris/arch-v10/kernel/kgdb.c
+++ b/arch/cris/arch-v10/kernel/kgdb.c
@@ -523,7 +523,7 @@ getpacket (char *buffer)
xmitcsum = -1;
count = 0;
/* Read until a # or the end of the buffer is reached */
- while (count < BUFMAX) {
+ while (count < BUFMAX - 1) {
ch = getDebugChar ();
if (ch == '#')
break;
--
1.7.0.4
next prev parent reply other threads:[~2013-02-12 14:53 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-12 14:52 [PATCH 0/10] Some criss allmodconfig fixes Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 01/10] cris/kgdb: Properly split long lines in asm Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 02/10] cris/kgdb: Remove unused static int do_printk Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 03/10] cris/kgdb: Kill forward declarations for static functions Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 04/10] cris/kgdb: Use #ifdef PROCESS_SUPPORT where needed Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 05/10] cris/kgb: Make symbols used from asm global Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 06/10] cris/kgdb: Remove obsolete USED*() macros Geert Uytterhoeven
2013-02-12 14:52 ` Geert Uytterhoeven [this message]
2013-02-12 14:52 ` [PATCH 08/10] [RFC] cris/kgdb: Remove sections protected by #ifdef PROCESS_SUPPORT Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 09/10] cris: Provide <asm/kvm_para.h> Geert Uytterhoeven
2013-02-12 14:52 ` [PATCH 10/10] cris: Provide inb_p() and outb_p() Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360680777-12622-8-git-send-email-geert@linux-m68k.org \
--to=geert@linux-m68k.org \
--cc=jesper.nilsson@axis.com \
--cc=linux-cris-kernel@axis.com \
--cc=linux-kernel@vger.kernel.org \
--cc=starvik@axis.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®