Fixed findings

List of Findings

Error: COMPILER_WARNING (CWE-457): [#def1]
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/api.h:189:33: warning[-Wmaybe-uninitialized]: ‘sk.socket’ may be used uninitialized
#  189 |     CUDT&       core() { return m_UDT; }
#      |                                 ^~~~~
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/group.cpp: scope_hint: In member function ‘srt::CUDTGroup::getOpt(SRT_SOCKOPT, void*, int&)’
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/group.cpp:788:34: note: ‘sk.socket’ was declared here
#  788 |         CUDTUnited::SocketKeeper sk(CUDT::uglobal(), ps);
#      |                                  ^~
#  187|       sync::Mutex m_ControlLock; //< lock this socket exclusively for control APIs: bind/listen/connect
#  188|   
#  189|->     CUDT&       core() { return m_UDT; }
#  190|       const CUDT& core() const { return m_UDT; }
#  191|   

Error: COMPILER_WARNING: [#def2]
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/logging.h: scope_hint: In member function ‘srt_logging::Logger::Logger(int, srt_logging::LogConfig&, char const*)’
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/logging.h:175:55: warning[-Wformat-truncation=]: ‘%s’ directive output may be truncated writing up to 30 bytes into a region of size 23
#  175 |             snprintf(prefix, MAX_PREFIX_SIZE + 1, "%s:%s", your_pfx, logger_pfx);
#      |                                                       ^~
/usr/include/bits/stdio2.h:68:35: note: ‘__snprintf_chk’ output between 11 and 41 bytes into a destination of size 33
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  173|               _snprintf(prefix, MAX_PREFIX_SIZE, "%s:%s", your_pfx, logger_pfx);
#  174|   #else
#  175|->             snprintf(prefix, MAX_PREFIX_SIZE + 1, "%s:%s", your_pfx, logger_pfx);
#  176|   #endif
#  177|           }

Error: COMPILER_WARNING: [#def3]
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/logging.h: scope_hint: In member function ‘srt_logging::Logger::Logger(int, srt_logging::LogConfig&, char const*)’
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/logging.h:175:57: warning[-Wformat-truncation=]: ‘__snprintf_chk’ output may be truncated before the last format character
#  175 |             snprintf(prefix, MAX_PREFIX_SIZE + 1, "%s:%s", your_pfx, logger_pfx);
#      |                                                         ^
/usr/include/bits/stdio2.h:68:35: note: ‘__snprintf_chk’ output between 4 and 34 bytes into a destination of size 33
#   68 |   return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
#      |          ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   69 |                                    __glibc_objsize (__s), __fmt,
#      |                                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#   70 |                                    __va_arg_pack ());
#      |                                    ~~~~~~~~~~~~~~~~~
#  173|               _snprintf(prefix, MAX_PREFIX_SIZE, "%s:%s", your_pfx, logger_pfx);
#  174|   #else
#  175|->             snprintf(prefix, MAX_PREFIX_SIZE + 1, "%s:%s", your_pfx, logger_pfx);
#  176|   #endif
#  177|           }

Error: COMPILER_WARNING (CWE-457): [#def4]
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/queue.cpp: scope_hint: In member function ‘worker_ProcessAddressedPacket’
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/queue.cpp:1513:1: warning[-Wmaybe-uninitialized]: ‘sk.socket’ may be used uninitialized
# 1513 | }
#      | ^
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/queue.cpp:1480:30: note: ‘sk.socket’ was declared here
# 1480 |     CUDTUnited::SocketKeeper sk (CUDT::uglobal(), u->m_parent);
#      |                              ^
# 1511|   
# 1512|       return CONN_RUNNING;
# 1513|-> }
# 1514|   
# 1515|   // This function responds to the fact that a packet has come

Error: COMPILER_WARNING: [#def5]
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/common.h:69: included_from: Included from here.
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/packet.h:57: included_from: Included from here.
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/api.h:61: included_from: Included from here.
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/api.cpp:64: included_from: Included from here.
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/sync.h:575:24: warning[-Wtemplate-id-cdtor]: template-id not allowed for constructor in C++20
#  575 |     CSharedObjectPtr<T>()
#      |                        ^
srt-1.5.4-build/srt-1.5.4-rc.0/srtcore/sync.h:575:24: note: remove the ‘< >’
#  573|   {
#  574|   public:
#  575|->     CSharedObjectPtr<T>()
#  576|           : m_pObj(NULL)
#  577|       {

Scan Properties

analyzer-version-clippy1.82.0
analyzer-version-cppcheck2.16.0
analyzer-version-gcc14.2.1
analyzer-version-gcc-analyzer15.0.0
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.82.0
diffbase-analyzer-version-cppcheck2.16.0
diffbase-analyzer-version-gcc14.2.1
diffbase-analyzer-version-gcc-analyzer15.0.0
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-65.us-west-2.compute.internal
diffbase-mock-configfedora-rawhide-gcc-latest-x86_64
diffbase-project-namesrt-1.5.4-1.fc42
diffbase-store-results-to/tmp/tmpokxl0kmq/srt-1.5.4-1.fc42.tar.xz
diffbase-time-created2024-11-13 03:30:23
diffbase-time-finished2024-11-13 03:32:30
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpokxl0kmq/srt-1.5.4-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpokxl0kmq/srt-1.5.4-1.fc42.src.rpm'
diffbase-tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-65.us-west-2.compute.internal
mock-configfedora-rawhide-gcc-latest-x86_64
project-namesrt-1.5.4-0.rc0.fc41
store-results-to/tmp/tmpgjcp62vj/srt-1.5.4-0.rc0.fc41.tar.xz
time-created2024-11-13 03:25:32
time-finished2024-11-13 03:29:59
titleFixed findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpgjcp62vj/srt-1.5.4-0.rc0.fc41.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpgjcp62vj/srt-1.5.4-0.rc0.fc41.src.rpm'
tool-versioncsmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9