mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: Jason Wessel <[email protected]>
This commit is contained in:
parent
521cb40b0c
commit
adb4b83c12
2 changed files with 2 additions and 2 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue