Index: uspace/app/tester/vfs/vfs1.c
===================================================================
--- uspace/app/tester/vfs/vfs1.c	(revision 63448512ad24cc1ceeb9a344e89d03ebe59dc3a3)
+++ uspace/app/tester/vfs/vfs1.c	(revision c9957b65b4d97076c3d033571ea3018fa89a1953)
@@ -38,5 +38,6 @@
 #define TMPFS_DEVHANDLE	999
 
-char buf[FS_NAME_MAXLEN + 1] = "tmpfs";
+char fs_name[] = "tmpfs";
+char mp[] = "/";
 
 char *test_vfs1(bool quiet)
@@ -53,8 +54,11 @@
 	aid_t req;
 	req = async_send_1(vfs_phone, VFS_MOUNT, TMPFS_DEVHANDLE, NULL);
-	buf[sizeof(buf) - 1] = '/';
-	if (ipc_data_send(vfs_phone, buf, sizeof(buf)) != EOK) {
+	if (ipc_data_send(vfs_phone, fs_name, strlen(fs_name)) != EOK) {
 		async_wait_for(req, &rc);
-		return "Could not send data to VFS.\n";
+		return "Could not send fs_name to VFS.\n";
+	}
+	if (ipc_data_send(vfs_phone, mp, strlen(mp)) != EOK) {
+		async_wait_for(req, &rc);
+		return "Could not send mp to VFS.\n";
 	}
 	async_wait_for(req, &rc);
Index: uspace/srv/vfs/vfs_mount.c
===================================================================
--- uspace/srv/vfs/vfs_mount.c	(revision 63448512ad24cc1ceeb9a344e89d03ebe59dc3a3)
+++ uspace/srv/vfs/vfs_mount.c	(revision c9957b65b4d97076c3d033571ea3018fa89a1953)
@@ -80,10 +80,11 @@
 	 */
 
-	/*
-	 * Now, we expect the client to send us data with the name of the file
-	 * system and the path of the mountpoint.
-	 */
 	ipc_callid_t callid;
 	size_t size;
+
+	/*
+	 * Now, we expect the client to send us data with the name of the file
+	 * system.
+	 */
 	if (!ipc_data_receive(&callid, NULL, &size)) {
 		ipc_answer_0(callid, EINVAL);
@@ -93,17 +94,49 @@
 
 	/*
-	 * There is no sense in receiving data that can't hold a single
-	 * character of path. We won't accept data that exceed certain limits
-	 * either.
-	 */
-	if ((size < FS_NAME_MAXLEN + 1) ||
-	    (size > FS_NAME_MAXLEN + MAX_PATH_LEN)) {
-		ipc_answer_0(callid, EINVAL);
-		ipc_answer_0(rid, EINVAL);
-		return;
-	}
-
-	/*
-	 * Allocate buffer for the data being received.
+	 * Don't receive more than is necessary for storing a full file system
+	 * name.
+	 */
+	if (size < 1 || size > FS_NAME_MAXLEN) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+
+	/*
+	 * Deliver the file system name.
+	 */
+	char fs_name[FS_NAME_MAXLEN + 1];
+	(void) ipc_data_deliver(callid, fs_name, size);
+	fs_name[size] = '\0';
+	
+	/*
+	 * Check if we know a file system with the same name as is in fs_name.
+	 * This will also give us its file system handle.
+	 */
+	int fs_handle = fs_name_to_handle(fs_name, true);
+	if (!fs_handle) {
+		ipc_answer_0(rid, ENOENT);
+		return;
+	}
+
+	/*
+	 * Now, we want the client to send us the mount point.
+	 */
+	if (!ipc_data_receive(&callid, NULL, &size)) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+
+	/*
+	 * Check whether size is reasonable wrt. the mount point.
+	 */
+	if (size < 1 || size > MAX_PATH_LEN) {
+		ipc_answer_0(callid, EINVAL);
+		ipc_answer_0(rid, EINVAL);
+		return;
+	}
+	/*
+	 * Allocate buffer for the mount point data being received.
 	 */
 	uint8_t *buf;
@@ -116,22 +149,7 @@
 
 	/*
-	 * Deliver the data.
+	 * Deliver the mount point.
 	 */
 	(void) ipc_data_deliver(callid, buf, size);
-
-	char fs_name[FS_NAME_MAXLEN + 1];
-	memcpy(fs_name, buf, FS_NAME_MAXLEN);
-	fs_name[FS_NAME_MAXLEN] = '\0';
-
-	/*
-	 * Check if we know a file system with the same name as is in fs_name.
-	 * This will also give us its file system handle.
-	 */
-	int fs_handle = fs_name_to_handle(fs_name, true);
-	if (!fs_handle) {
-		free(buf);
-		ipc_answer_0(rid, ENOENT);
-		return;
-	}
 
 	/*
@@ -166,6 +184,5 @@
 		 */
 		futex_down(&unlink_futex);
-		rc = vfs_lookup_internal((char *) (buf + FS_NAME_MAXLEN),
-		    size - FS_NAME_MAXLEN, &mp, NULL);
+		rc = vfs_lookup_internal(buf, size, &mp, NULL);
 		if (rc != EOK) {
 			/*
@@ -198,6 +215,5 @@
 		 * We still don't have the root file system mounted.
 		 */
-		if ((size - FS_NAME_MAXLEN == strlen("/")) &&
-		    (buf[FS_NAME_MAXLEN] == '/')) {
+		if ((size == 1) && (buf[0] == '/')) {
 			/*
 			 * For this simple, but important case, we are done.
