From: Gabe Black Date: Thu, 23 Aug 2018 02:26:38 +0000 (-0700) Subject: systemc: Make the report handler handle null messages. X-Git-Tag: v19.0.0.0~1739 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d33eecfe8e38acb5fa6ac26cc2b7b371bdcda49;p=gem5.git systemc: Make the report handler handle null messages. It was checking the first character of the message for a null byte, but not whether the message string pointer itself was null. Change-Id: Iddef1e22c35b55c8c898670576ab416dd1023d7c Reviewed-on: https://gem5-review.googlesource.com/12252 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/systemc/utils/sc_report_handler.cc b/src/systemc/utils/sc_report_handler.cc index 6b259342a..e08ad6624 100644 --- a/src/systemc/utils/sc_report_handler.cc +++ b/src/systemc/utils/sc_report_handler.cc @@ -413,7 +413,7 @@ sc_report_compose_message(const sc_report &report) str << report.get_msg_type(); const char *msg = report.get_msg(); - if (msg[0]) + if (msg && msg[0]) str << ": " << msg; if (report.get_severity() > SC_INFO) {