Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#4434 closed defect (fixed)

record-filter-zlib.cc: Uninitialized pointer field error spotted by Coverity

Reported by: Ryan Long Owned by: Ryan Long <ryan.long@…>
Priority: normal Milestone: 6.1
Component: tool Version: 6
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

CID 1503020: Uninitialized pointer field in ZlibFilter?().

36ZlibFilter::ZlibFilter() : buffer_(65536)
37{
  CID 1503013: Unchecked return value from library (CHECKED_RETURN) [select issue]
38  inflateInit(&stream_);
  2. uninit_member: Non-static class member stream_.next_in is not initialized in this constructor nor in any functions that it calls.
  4. uninit_member: Non-static class member stream_.avail_in is not initialized in this constructor nor in any functions that it calls.
  6. uninit_member: Non-static class member stream_.total_in is not initialized in this constructor nor in any functions that it calls.
  8. uninit_member: Non-static class member stream_.next_out is not initialized in this constructor nor in any functions that it calls.
  10. uninit_member: Non-static class member stream_.avail_out is not initialized in this constructor nor in any functions that it calls.
  12. uninit_member: Non-static class member stream_.total_out is not initialized in this constructor nor in any functions that it calls.
  14. uninit_member: Non-static class member stream_.msg is not initialized in this constructor nor in any functions that it calls.
  16. uninit_member: Non-static class member stream_.zalloc is not initialized in this constructor nor in any functions that it calls.
  18. uninit_member: Non-static class member stream_.zfree is not initialized in this constructor nor in any functions that it calls.
  20. uninit_member: Non-static class member stream_.opaque is not initialized in this constructor nor in any functions that it calls.
  22. uninit_member: Non-static class member stream_.data_type is not initialized in this constructor nor in any functions that it calls.
  24. uninit_member: Non-static class member stream_.adler is not initialized in this constructor nor in any functions that it calls.
  CID 1503020 (#1 of 1): Uninitialized pointer field (UNINIT_CTOR)26. uninit_member: Non-static class member stream_.reserved is not initialized in this constructor nor in any functions that it calls.
39}

Change History (1)

comment:1 Changed on 09/27/21 at 22:18:30 by Ryan Long <ryan.long@…>

Owner: set to Ryan Long <ryan.long@…>
Resolution: fixed
Status: newclosed

In [changeset:"7b5dc22c5d5f82354365bab10e9ae8e269b6b438/rtems-tools" 7b5dc22/rtems-tools]:

record-filter-zlib.cc: Initialize stream_'s fields

CID 1503020: Uninitialized pointer field

Closes #4434

Note: See TracTickets for help on using tickets.