Closed wangweij closed 3 months ago
Describe the bug
70 sk_fname = malloc(strlen(method_name) + strlen(".sk")); .... 78 strcpy(sk_fname, method_name); 79 strcat(sk_fname, ".sk");
Here, the size of sk_fname is only enough to contain method_name and ".sk" but not the zero at the end of ".sk".
sk_fname
method_name
To Reproduce This is a coding error.
Suggested Fix
- sk_fname = malloc(strlen(method_name) + strlen(".sk")); + sk_fname = malloc(strlen(method_name) + strlen(".sk") + 1);
Thanks for the report! Created #1887 to fix.
Describe the bug
Here, the size of
sk_fname
is only enough to containmethod_name
and ".sk" but not the zero at the end of ".sk".To Reproduce This is a coding error.
Suggested Fix