mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2025-07-03 14:48:19 +00:00
Fix segfault when interpreting bad debug_file
BUG=chromium:661037 Change-Id: Ia4da0bd9787c232a6a199cfdfccfbed60c2515c2 Reviewed-on: https://chromium-review.googlesource.com/450090 Reviewed-by: Joshua Peraza <jperaza@chromium.org>
This commit is contained in:
parent
32a9e03835
commit
5dbd93a0f8
|
@ -1988,11 +1988,13 @@ string MinidumpModule::debug_file() const {
|
||||||
// GetMiscRecord already byte-swapped the data[] field if it contains
|
// GetMiscRecord already byte-swapped the data[] field if it contains
|
||||||
// UTF-16, so pass false as the swap argument.
|
// UTF-16, so pass false as the swap argument.
|
||||||
scoped_ptr<string> new_file(UTF16ToUTF8(string_utf16, false));
|
scoped_ptr<string> new_file(UTF16ToUTF8(string_utf16, false));
|
||||||
|
if (new_file.get() != nullptr) {
|
||||||
file = *new_file;
|
file = *new_file;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Relatively common case
|
// Relatively common case
|
||||||
BPLOG_IF(INFO, file.empty()) << "MinidumpModule could not determine "
|
BPLOG_IF(INFO, file.empty()) << "MinidumpModule could not determine "
|
||||||
|
|
Loading…
Reference in a new issue