add missing null-termination

This commit is contained in:
cremno
2014-11-25 01:46:06 +01:00
parent 87ce13f91d
commit 5f1e90fc58
@@ -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;
}