Index: uspace/lib/libc/generic/vfs.c
===================================================================
--- uspace/lib/libc/generic/vfs.c	(revision 449c246f2fdcbdd111514fae0ec31618fb3c1080)
+++ uspace/lib/libc/generic/vfs.c	(revision badbd888ca37567fce496cb0f320a8e72e9dee6e)
@@ -144,5 +144,5 @@
 	}
 	req = async_send_1(vfs_phone, VFS_READ, fildes, &answer);
-	if (ipc_data_read_send(vfs_phone, buf, sizeof(buf)) != EOK) {
+	if (ipc_data_read_send(vfs_phone, (void *)buf, nbyte) != EOK) {
 		async_wait_for(req, NULL);
 		async_serialize_end();
@@ -174,5 +174,5 @@
 	}
 	req = async_send_1(vfs_phone, VFS_WRITE, fildes, &answer);
-	if (ipc_data_write_send(vfs_phone, buf, sizeof(buf)) != EOK) {
+	if (ipc_data_write_send(vfs_phone, (void *)buf, nbyte) != EOK) {
 		async_wait_for(req, NULL);
 		async_serialize_end();
