summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorValentin Bartenev <vbart@nginx.com>2020-10-30 07:55:26 +0300
committerValentin Bartenev <vbart@nginx.com>2020-10-30 07:55:26 +0300
commit50af47fd7c03aecb5bb9f248cac8ccbdb65c9b4c (patch)
tree958f69b837e06c248fc1b4ef77aed306d32e6c8d /src
parent0390cb3a61051dd93e206d50591aff5759cf42fc (diff)
downloadunit-50af47fd7c03aecb5bb9f248cac8ccbdb65c9b4c.tar.gz
unit-50af47fd7c03aecb5bb9f248cac8ccbdb65c9b4c.tar.bz2
Isolation: fixed passing custom options to nmount().
The "iov" array was filled incorrectly when custom mounting options were set.
Diffstat (limited to '')
-rw-r--r--src/nxt_fs.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/nxt_fs.c b/src/nxt_fs.c
index 87d3b4a5..71498f99 100644
--- a/src/nxt_fs.c
+++ b/src/nxt_fs.c
@@ -172,8 +172,10 @@ nxt_fs_mount(nxt_task_t *task, nxt_fs_mount_t *mnt)
*end = '\0';
- iov[iovlen++].iov_base = (void *) p;
- iov[iovlen++].iov_len = (end - p) + 1;
+ iov[iovlen].iov_base = (void *) p;
+ iov[iovlen].iov_len = (end - p) + 1;
+
+ iovlen++;
p = end + 1;
@@ -182,8 +184,10 @@ nxt_fs_mount(nxt_task_t *task, nxt_fs_mount_t *mnt)
*end = '\0';
}
- iov[iovlen++].iov_base = (void *) p;
- iov[iovlen++].iov_len = nxt_strlen(p) + 1;
+ iov[iovlen].iov_base = (void *) p;
+ iov[iovlen].iov_len = nxt_strlen(p) + 1;
+
+ iovlen++;
} while (end != NULL && nxt_nitems(iov) > (iovlen + 2));
}