diff options
author | Dan Carpenter <error27@gmail.com> | 2010-03-15 13:28:00 +0100 |
---|---|---|
committer | Jason Wessel <jason.wessel@windriver.com> | 2011-03-25 22:37:30 +0100 |
commit | adb4b83c12f9d966ea3478aa14c60511467c9916 (patch) | |
tree | b9dd2efee119cc6f053ffa6fb50a3d336e5e3dfb /drivers/misc/kgdbts.c | |
parent | Linux 2.6.38 (diff) | |
download | linux-adb4b83c12f9d966ea3478aa14c60511467c9916.tar.xz 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/misc/kgdbts.c')
-rw-r--r-- | drivers/misc/kgdbts.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index 59c118c19a91..27dc463097f3 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c @@ -988,7 +988,7 @@ static void kgdbts_run_tests(void) static int kgdbts_option_setup(char *opt) { - if (strlen(opt) > MAX_CONFIG_LEN) { + if (strlen(opt) >= MAX_CONFIG_LEN) { printk(KERN_ERR "kgdbts: config string too long\n"); return -ENOSPC; } |