diff options
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/kgdbts.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/misc/kgdbts.c b/drivers/misc/kgdbts.c index e4ff50b95a5e..fcb6ec1af173 100644 --- a/drivers/misc/kgdbts.c +++ b/drivers/misc/kgdbts.c | |||
@@ -712,6 +712,12 @@ static int run_simple_test(int is_get_char, int chr) | |||
712 | 712 | ||
713 | /* End of packet == #XX so look for the '#' */ | 713 | /* End of packet == #XX so look for the '#' */ |
714 | if (put_buf_cnt > 3 && put_buf[put_buf_cnt - 3] == '#') { | 714 | if (put_buf_cnt > 3 && put_buf[put_buf_cnt - 3] == '#') { |
715 | if (put_buf_cnt >= BUFMAX) { | ||
716 | eprintk("kgdbts: ERROR: put buffer overflow on" | ||
717 | " '%s' line %i\n", ts.name, ts.idx); | ||
718 | put_buf_cnt = 0; | ||
719 | return 0; | ||
720 | } | ||
715 | put_buf[put_buf_cnt] = '\0'; | 721 | put_buf[put_buf_cnt] = '\0'; |
716 | v2printk("put%i: %s\n", ts.idx, put_buf); | 722 | v2printk("put%i: %s\n", ts.idx, put_buf); |
717 | /* Trigger check here */ | 723 | /* Trigger check here */ |
@@ -885,16 +891,16 @@ static void kgdbts_run_tests(void) | |||
885 | int nmi_sleep = 0; | 891 | int nmi_sleep = 0; |
886 | int i; | 892 | int i; |
887 | 893 | ||
888 | ptr = strstr(config, "F"); | 894 | ptr = strchr(config, 'F'); |
889 | if (ptr) | 895 | if (ptr) |
890 | fork_test = simple_strtol(ptr + 1, NULL, 10); | 896 | fork_test = simple_strtol(ptr + 1, NULL, 10); |
891 | ptr = strstr(config, "S"); | 897 | ptr = strchr(config, 'S'); |
892 | if (ptr) | 898 | if (ptr) |
893 | do_sys_open_test = simple_strtol(ptr + 1, NULL, 10); | 899 | do_sys_open_test = simple_strtol(ptr + 1, NULL, 10); |
894 | ptr = strstr(config, "N"); | 900 | ptr = strchr(config, 'N'); |
895 | if (ptr) | 901 | if (ptr) |
896 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); | 902 | nmi_sleep = simple_strtol(ptr+1, NULL, 10); |
897 | ptr = strstr(config, "I"); | 903 | ptr = strchr(config, 'I'); |
898 | if (ptr) | 904 | if (ptr) |
899 | sstep_test = simple_strtol(ptr+1, NULL, 10); | 905 | sstep_test = simple_strtol(ptr+1, NULL, 10); |
900 | 906 | ||