1 diff -urp 1/parser.c 2/parser.c
2 --- 1/parser.c 2008-10-28 04:17:05.000000000 +0800
3 +++ 2/parser.c 2018-06-26 20:25:59.000000000 +0800
4 @@ -203,7 +203,7 @@ static char *get_optstr(char *buf, char
5 len = strnlen(string, BUFSIZE);
6 sprintf(search_str, "%s=%%%ds\\n", string, BUFSIZE - len-1);
7 if (1 == sscanf(line, search_str, &temp)) {
8 - len = strnlen(temp, 4096);
9 + len = strnlen(temp, 4095) + 1;
10 ret_buf = malloc(len);
11 strncpy(ret_buf, temp, len);