Commit 5f1e90fc authored by cremno's avatar cremno

add missing null-termination

parent 87ce13f9
......@@ -75,6 +75,7 @@ dirname(mrb_state *mrb, const char *path)
if ((dir = mrb_malloc(mrb, len + 1)) != NULL) {
strncpy(dir, path, len);
dir[len] = '\0';
}
return dir;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment