summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2018-12-24 22:16:28 +0100
committerZach Hilman <zachhilman@gmail.com>2018-12-28 21:30:36 +0100
commit94db6e5f3fc347b4fe1cbeb862019be55f8203ea (patch)
treeb4698d6215e43b2ae252826bb3a995c21053fa6f /src
parentMerge pull request #1954 from lioncash/npdm (diff)
downloadyuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar.gz
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar.bz2
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar.lz
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar.xz
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.tar.zst
yuzu-94db6e5f3fc347b4fe1cbeb862019be55f8203ea.zip
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/am/am.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp
index d13ce4dca..512386422 100644
--- a/src/core/hle/service/am/am.cpp
+++ b/src/core/hle/service/am/am.cpp
@@ -721,10 +721,10 @@ void IStorageAccessor::Write(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 offset{rp.Pop<u64>()};
- LOG_DEBUG(Service_AM, "called, offset={}", offset);
-
const std::vector<u8> data{ctx.ReadBuffer()};
+ LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, data.size());
+
if (data.size() > backing.buffer.size() - offset) {
LOG_ERROR(Service_AM,
"offset is out of bounds, backing_buffer_sz={}, data_size={}, offset={}",
@@ -744,10 +744,10 @@ void IStorageAccessor::Read(Kernel::HLERequestContext& ctx) {
IPC::RequestParser rp{ctx};
const u64 offset{rp.Pop<u64>()};
- LOG_DEBUG(Service_AM, "called, offset={}", offset);
-
const std::size_t size{ctx.GetWriteBufferSize()};
+ LOG_DEBUG(Service_AM, "called, offset={}, size={}", offset, size);
+
if (size > backing.buffer.size() - offset) {
LOG_ERROR(Service_AM, "offset is out of bounds, backing_buffer_sz={}, size={}, offset={}",
backing.buffer.size(), size, offset);