diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
index 44e062f50d7164272fb933594d2c44669604d350..010072a5b31da969b25d26d9c02e1041de51505e 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.cpp
@@ -97,7 +97,9 @@ u32 nvhost_ctrl_gpu::GetTPCMasks(const std::vector<u8>& input, std::vector<u8>&
 u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector<u8>& output) {
     LOG_DEBUG(Service_NVDRV, "called");
     IoctlActiveSlotMask params{};
-    std::memcpy(&params, input.data(), input.size());
+    if (input.size() > 0) {
+        std::memcpy(&params, input.data(), input.size());
+    }
     params.slot = 0x07;
     params.mask = 0x01;
     std::memcpy(output.data(), &params, output.size());
@@ -107,7 +109,9 @@ u32 nvhost_ctrl_gpu::GetActiveSlotMask(const std::vector<u8>& input, std::vector
 u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u8>& output) {
     LOG_DEBUG(Service_NVDRV, "called");
     IoctlZcullGetCtxSize params{};
-    std::memcpy(&params, input.data(), input.size());
+    if (input.size() > 0) {
+        std::memcpy(&params, input.data(), input.size());
+    }
     params.size = 0x1;
     std::memcpy(output.data(), &params, output.size());
     return 0;
@@ -116,7 +120,11 @@ u32 nvhost_ctrl_gpu::ZCullGetCtxSize(const std::vector<u8>& input, std::vector<u
 u32 nvhost_ctrl_gpu::ZCullGetInfo(const std::vector<u8>& input, std::vector<u8>& output) {
     LOG_DEBUG(Service_NVDRV, "called");
     IoctlNvgpuGpuZcullGetInfoArgs params{};
-    std::memcpy(&params, input.data(), input.size());
+
+    if (input.size() > 0) {
+        std::memcpy(&params, input.data(), input.size());
+    }
+
     params.width_align_pixels = 0x20;
     params.height_align_pixels = 0x20;
     params.pixel_squares_by_aliquots = 0x400;
diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
index 126782573a82bdd7fe347a0c4f92950c8eee5e19..5a1123ad26cb8e3fabad431ebd2b817d7b103d01 100644
--- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
+++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.cpp
@@ -132,9 +132,12 @@ u32 nvhost_gpu::SubmitGPFIFO(const std::vector<u8>& input, std::vector<u8>& outp
     LOG_WARNING(Service_NVDRV, "(STUBBED) called, gpfifo={:X}, num_entries={:X}, flags={:X}",
                 params.address, params.num_entries, params.flags);
 
-    auto entries = std::vector<IoctlGpfifoEntry>();
-    entries.resize(params.num_entries);
-    std::memcpy(&entries[0], &input.data()[sizeof(IoctlSubmitGpfifo)],
+    ASSERT_MSG(input.size() ==
+                   sizeof(IoctlSubmitGpfifo) + params.num_entries * sizeof(IoctlGpfifoEntry),
+               "Incorrect input size");
+
+    std::vector<IoctlGpfifoEntry> entries(params.num_entries);
+    std::memcpy(entries.data(), &input[sizeof(IoctlSubmitGpfifo)],
                 params.num_entries * sizeof(IoctlGpfifoEntry));
     for (auto entry : entries) {
         Tegra::GPUVAddr va_addr = entry.Address();
diff --git a/src/video_core/macro_interpreter.cpp b/src/video_core/macro_interpreter.cpp
index 44ece01c140789e697b8a2c939516f0938dfa71e..377bd66ab000969287e2157d2dc097564cb32351 100644
--- a/src/video_core/macro_interpreter.cpp
+++ b/src/video_core/macro_interpreter.cpp
@@ -102,11 +102,11 @@ bool MacroInterpreter::Step(const std::vector<u32>& code, bool is_delay_slot) {
         if (taken) {
             // Ignore the delay slot if the branch has the annul bit.
             if (opcode.branch_annul) {
-                pc = base_address + (opcode.immediate << 2);
+                pc = base_address + opcode.GetBranchTarget();
                 return true;
             }
 
-            delayed_pc = base_address + (opcode.immediate << 2);
+            delayed_pc = base_address + opcode.GetBranchTarget();
             // Execute one more instruction due to the delay slot.
             return Step(code, true);
         }
diff --git a/src/video_core/macro_interpreter.h b/src/video_core/macro_interpreter.h
index a71e359d89a52798b266aacd7d54341b63a0e5db..7d836b816091f335413bec5fa46564a9d8ddc744 100644
--- a/src/video_core/macro_interpreter.h
+++ b/src/video_core/macro_interpreter.h
@@ -91,6 +91,10 @@ private:
         u32 GetBitfieldMask() const {
             return (1 << bf_size) - 1;
         }
+
+        s32 GetBranchTarget() const {
+            return static_cast<s32>(immediate * sizeof(u32));
+        }
     };
 
     union MethodAddress {