Isolation: fixed passing custom options to nmount().

The "iov" array was filled incorrectly when custom mounting options were set.
This commit is contained in:
Valentin Bartenev
2020-10-30 07:55:26 +03:00
parent 0390cb3a61
commit 50af47fd7c

View File

@@ -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));
}