Commit e7f9f58f authored by Lioncash's avatar Lioncash
Browse files

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.
parent 3b19f741
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment