[RTEMS Project] #4486: TraceWriterQEMU.cc: String not null terminated issue spotted by Coverity

RTEMS trac trac at rtems.org
Wed Aug 4 18:31:34 UTC 2021


#4486: TraceWriterQEMU.cc: String not null terminated issue spotted by Coverity
------------------------+--------------------
  Reporter:  Ryan Long  |      Owner:  (none)
      Type:  defect     |     Status:  new
  Priority:  normal     |  Milestone:  6.1
 Component:  tool       |    Version:  6
  Severity:  normal     |   Keywords:
Blocked By:             |   Blocking:
------------------------+--------------------
 CID 1506203: String not null terminated
 {{{
    CID 1506203 (#1 of 1): String not null terminated (STRING_NULL)6.
 string_null: Passing unterminated string header.magic to operator <<,
 which expects a null-terminated string. [Note: The source code
 implementation of the function has been overridden by a builtin model.]
 124      std::cerr << "magic = " << header.magic << std::endl
 125                << "version = " << header.version << std::endl
 126                << "kind = " << header.kind << std::endl
 127                << "sizeof_target_pc = " << header.sizeof_target_pc <<
 std::endl
 128                << "big_endian = " << header.big_endian << std::endl
 129                << std::hex << std::setfill('0')
 130                << "machine = " << std::setw(2) << header.machine[0]
 131                << ':' << header.machine[1]
 132                << std::dec << std::setfill(' ')
 133                << std::endl;
 }}}

--
Ticket URL: <http://devel.rtems.org/ticket/4486>
RTEMS Project <http://www.rtems.org/>
RTEMS Project


More information about the bugs mailing list