diff options
| author | 2021-04-19 14:30:36 -0700 | |
|---|---|---|
| committer | 2021-04-19 14:30:36 -0700 | |
| commit | 0da84c4de8cc831ccffd67a8ce4e953c0c92fd87 (patch) | |
| tree | 4f19c85f5ba050b7bac3dbbd5390588449ecb009 /src | |
| parent | Merge pull request #6208 from lat9nq/boost-static (diff) | |
| parent | arp: Use type alias for issue function (diff) | |
| download | yuzu-0da84c4de8cc831ccffd67a8ce4e953c0c92fd87.tar.gz yuzu-0da84c4de8cc831ccffd67a8ce4e953c0c92fd87.tar.xz yuzu-0da84c4de8cc831ccffd67a8ce4e953c0c92fd87.zip | |
Merge pull request #6216 from lioncash/uninit-read
arp: Prevent potential uninitialized read of launch member variable
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/hle/service/glue/arp.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/hle/service/glue/arp.cpp b/src/core/hle/service/glue/arp.cpp index 322125135..7b1c6677c 100644 --- a/src/core/hle/service/glue/arp.cpp +++ b/src/core/hle/service/glue/arp.cpp | |||
| @@ -157,9 +157,9 @@ class IRegistrar final : public ServiceFramework<IRegistrar> { | |||
| 157 | friend class ARP_W; | 157 | friend class ARP_W; |
| 158 | 158 | ||
| 159 | public: | 159 | public: |
| 160 | explicit IRegistrar( | 160 | using IssuerFn = std::function<ResultCode(u64, ApplicationLaunchProperty, std::vector<u8>)>; |
| 161 | Core::System& system_, | 161 | |
| 162 | std::function<ResultCode(u64, ApplicationLaunchProperty, std::vector<u8>)> issuer) | 162 | explicit IRegistrar(Core::System& system_, IssuerFn&& issuer) |
| 163 | : ServiceFramework{system_, "IRegistrar"}, issue_process_id{std::move(issuer)} { | 163 | : ServiceFramework{system_, "IRegistrar"}, issue_process_id{std::move(issuer)} { |
| 164 | // clang-format off | 164 | // clang-format off |
| 165 | static const FunctionInfo functions[] = { | 165 | static const FunctionInfo functions[] = { |
| @@ -238,9 +238,9 @@ private: | |||
| 238 | rb.Push(RESULT_SUCCESS); | 238 | rb.Push(RESULT_SUCCESS); |
| 239 | } | 239 | } |
| 240 | 240 | ||
| 241 | std::function<ResultCode(u64, ApplicationLaunchProperty, std::vector<u8>)> issue_process_id; | 241 | IssuerFn issue_process_id; |
| 242 | bool issued = false; | 242 | bool issued = false; |
| 243 | ApplicationLaunchProperty launch; | 243 | ApplicationLaunchProperty launch{}; |
| 244 | std::vector<u8> control; | 244 | std::vector<u8> control; |
| 245 | }; | 245 | }; |
| 246 | 246 | ||