Skip to content
Snippets Groups Projects
Commit 88c263ee authored by Lioncash's avatar Lioncash
Browse files

service/am: Add missing return in error case for IStorageAccessor's Read()/Write().

Previously this would fall through and return successfully, despite
being an out of bounds read or write.
parent c4d54991
No related branches found
No related tags found
No related merge requests found
......@@ -835,6 +835,7 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ERR_SIZE_OUT_OF_BOUNDS);
return;
}
std::memcpy(backing.buffer.data() + offset, data.data(), data.size());
......@@ -857,6 +858,7 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
IPC::ResponseBuilder rb{ctx, 2};
rb.Push(ERR_SIZE_OUT_OF_BOUNDS);
return;
}
ctx.WriteBuffer(backing.buffer.data() + offset, size);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment