summaryrefslogtreecommitdiff
path: root/libbb/dirname.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/dirname.c')
-rw-r--r--libbb/dirname.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/dirname.c b/libbb/dirname.c
index cc50f58..5f83994 100644
--- a/libbb/dirname.c
+++ b/libbb/dirname.c
@@ -45,5 +45,5 @@ char *dirname(const char *path)
if (s < path)
return xstrdup (".");
else
- return strdup_substr (path, 0, s - path + 1);
+ return xstrndup (path, s - path + 1);
}