diff options
| author | Lioncash <mathew1800@gmail.com> | 2022-12-05 21:26:00 -0500 |
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2022-12-05 21:31:34 -0500 |
| commit | 97fd619312b57ddc9307049d5ea0c1263b0b1806 (patch) | |
| tree | fb5caf9dc17fe8639d5a9138727f1adf3c8961fc /src/core/memory.cpp | |
| parent | b4ef55753e4b400ec5919b797fc152ce71f157de (diff) | |
reporter: Eliminate undefined behavior in SaveErrorReport
The optionals are unconditionally dereferenced when setting the custom
error text, and in a few cases this function is called using the default
value of the optionals.
This means we'd be dereferencing uninitialized storage.
Since they're used unconditionally, we can use value_or to set a default
when storage is uninitialized.
Diffstat (limited to 'src/core/memory.cpp')
0 files changed, 0 insertions, 0 deletions
