# HG changeset patch # User Paul Boddie # Date 1563809797 -7200 # Node ID 9e6aae29b3ad3adcc719a1ea187b23de3af96366 # Parent 8bd275fa058d23f06f114f3ea11fabfde88ad97e Use the appropriate function to access paths in buffers. diff -r 8bd275fa058d -r 9e6aae29b3ad server/src/main.cc --- a/server/src/main.cc Sun Jun 30 00:43:24 2019 +0200 +++ b/server/src/main.cc Mon Jul 22 17:36:37 2019 +0200 @@ -115,7 +115,15 @@ /* Match the path to a mountpoint. */ - MountTableIterator entry = find_mountpoint(desc.obj.buffer); + char *path = fsdesc_get_name(&desc.obj); + + if (path == NULL) + { + ipc_message_send_error(msg, -L4_EINVAL); + return; + } + + MountTableIterator entry = find_mountpoint(path); if (entry == _servers.end()) { @@ -125,7 +133,7 @@ /* Rewrite the path for the selected filesystem. */ - rewrite_path(desc.obj.buffer, entry->first); + rewrite_path(path, entry->first); /* Find the path within the selected filesystem. */