[PATCH] TraceWriterQEMU.cc: Remove unterminated string

Ryan Long ryan.long at oarcorp.com
Thu Aug 12 14:00:39 UTC 2021


Replaced header.magic with QEMU_TRACE_MAGIC to get rid of "String not
null terminated" Coverity issue.

CID 1506203: String not null terminated

Closes #4486
---
 tester/covoar/TraceWriterQEMU.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tester/covoar/TraceWriterQEMU.cc b/tester/covoar/TraceWriterQEMU.cc
index c417745..177b77f 100644
--- a/tester/covoar/TraceWriterQEMU.cc
+++ b/tester/covoar/TraceWriterQEMU.cc
@@ -121,7 +121,7 @@ namespace Trace {
     }
 
     if (verbose)
-      std::cerr << "magic = " << header.magic << std::endl
+      std::cerr << "magic = " << QEMU_TRACE_MAGIC << std::endl
                 << "version = " << header.version << std::endl
                 << "kind = " << header.kind << std::endl
                 << "sizeof_target_pc = " << header.sizeof_target_pc << std::endl
-- 
1.8.3.1



More information about the devel mailing list