diff options
author | Alejandro Colomar <alx@kernel.org> | 2024-04-23 23:27:06 +0200 |
---|---|---|
committer | Alejandro Colomar <alx@kernel.org> | 2024-06-18 22:59:44 +0200 |
commit | 3873f98f7e43967458a5080a30107cff52f8d935 (patch) | |
tree | ab888c33c226d05f75166d5ee2df85b670ef4c06 /src | |
parent | c6ce038123e4a2cf1678795cf6d86096be716c21 (diff) | |
download | unit-3873f98f7e43967458a5080a30107cff52f8d935.tar.gz unit-3873f98f7e43967458a5080a30107cff52f8d935.tar.bz2 |
fs: Accept path names of length 1 in nxt_fs_mkdir_p()
That is, accept "/", or relative path names of a single byte.
Fixes: e2b53e16c60b ("Added "rootfs" feature.")
Tested-by: Andy Postnikov <apostnikov@gmail.com>
Tested-by: Andrew Clayton <a.clayton@nginx.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/nxt_fs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_fs.c b/src/nxt_fs.c index 3c33837c..0d10f623 100644 --- a/src/nxt_fs.c +++ b/src/nxt_fs.c @@ -18,7 +18,7 @@ nxt_fs_mkdir_p(const u_char *dir, mode_t mode) dirlen = nxt_strlen(dir); - nxt_assert(dirlen < PATH_MAX && dirlen > 1); + nxt_assert(dirlen < PATH_MAX && dirlen > 0); dst = path; start = (char *) dir; |