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>

authored by Dan Carpenter and committed by Jason Wessel adb4b83c 521cb40b

+2 -2
+1 -1
drivers/misc/kgdbts.c
··· 988 988 989 989 static int kgdbts_option_setup(char *opt) 990 990 { 991 - if (strlen(opt) > MAX_CONFIG_LEN) { 991 + if (strlen(opt) >= MAX_CONFIG_LEN) { 992 992 printk(KERN_ERR "kgdbts: config string too long\n"); 993 993 return -ENOSPC; 994 994 }
+1 -1
drivers/tty/serial/kgdboc.c
··· 131 131 132 132 static int kgdboc_option_setup(char *opt) 133 133 { 134 - if (strlen(opt) > MAX_CONFIG_LEN) { 134 + if (strlen(opt) >= MAX_CONFIG_LEN) { 135 135 printk(KERN_ERR "kgdboc: config string too long\n"); 136 136 return -ENOSPC; 137 137 }