Truncate error messages for the crash reporter to the maximum length permitted by the FIDL call (flutter/engine#17189)

This commit is contained in:
George Wright
2020-03-18 13:08:54 -07:00
committed by GitHub
parent 705c1e7b7d
commit 1b5254e49a

View File

@@ -64,6 +64,11 @@ fuchsia::feedback::CrashReport BuildCrashReport(
error.substr(delimiter_pos + 2 /*to get rid of the leading ': '*/);
}
// Truncate error message to the maximum length allowed for the crash_reporter
// FIDL call
error_message = error_message.substr(
0, fuchsia::feedback::MAX_EXCEPTION_MESSAGE_LENGTH - 1);
fuchsia::feedback::RuntimeCrashReport dart_report;
dart_report.set_exception_type(error_type);
dart_report.set_exception_message(error_message);