diff --git a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp index 21b9a76b3b..62529fd272 100644 --- a/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp +++ b/src/add-ons/kernel/file_systems/userlandfs/kernel_add_on/Volume.cpp @@ -2882,8 +2882,10 @@ Volume::ReadAttr(void* _node, void* cookie, off_t pos, || reply->bytesRead > bufferSize) { return B_BAD_DATA; } - if (reply->bytesRead > 0) - memcpy(buffer, readBuffer, reply->bytesRead); + if (reply->bytesRead > 0 + && user_memcpy(buffer, readBuffer, reply->bytesRead) < B_OK) { + return B_BAD_ADDRESS; + } *bytesRead = reply->bytesRead; _SendReceiptAck(port); return error;