summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2010-03-15 07:28:00 -0500
committerJason Wessel <jason.wessel@windriver.com>2011-03-25 16:37:30 -0500
commitadb4b83c12f9d966ea3478aa14c60511467c9916 (patch)
treeb9dd2efee119cc6f053ffa6fb50a3d336e5e3dfb /drivers/tty
parent521cb40b0c44418a4fd36dc633f575813d59a43d (diff)
downloadblackbird-op-linux-adb4b83c12f9d966ea3478aa14c60511467c9916.tar.gz
blackbird-op-linux-adb4b83c12f9d966ea3478aa14c60511467c9916.zip
kgdboc,kgdbts: strlen() doesn't count the terminator
This is an off by one because strlen() doesn't count the null terminator. We strcpy() these strings into an array of size MAX_CONFIG_LEN. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Jason Wessel <jason.wessel@windriver.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/kgdboc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/tty/serial/kgdboc.c b/drivers/tty/serial/kgdboc.c
index 25a8bc565f40..87e7e6c876d4 100644
--- a/drivers/tty/serial/kgdboc.c
+++ b/drivers/tty/serial/kgdboc.c
@@ -131,7 +131,7 @@ static void kgdboc_unregister_kbd(void)
static int kgdboc_option_setup(char *opt)
{
- if (strlen(opt) > MAX_CONFIG_LEN) {
+ if (strlen(opt) >= MAX_CONFIG_LEN) {
printk(KERN_ERR "kgdboc: config string too long\n");
return -ENOSPC;
}
OpenPOWER on IntegriCloud